Try to recover from a failed Raspberry PI SD card

So my raspberry pi would no longer start.  After some investigation I could only conclude that the SD card became corrupted.  It would initially start but it would hang somewhere halfway.  I would see new log entries when I added/removed usb deviced but it would not continue to boot.

So I first created an Ubuntu Live usb stick as described here: https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

As luck would have it my SD card reader was broken, so I had to borrow another one. Misery loves company!

Then I tried to repair the disk, but it kept on failing.

$ sudo fsck -v /dev/sdX2
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
sd-ext: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
fsck.ext4: unable to set superblock flags on sd-ext


sd-ext: ********** WARNING: Filesystem still has errors **********

The next step was to create a (file) image of the SD Card:

sudo dd if=/dev/sdX of=/media/flogiston/SomeDrive/data/raspberry-complete.img
    • sdX=> the value from X can be derived by doing a df -h before and after plugging in the corrupted sd card
      That will give you a list of devices.  Your new device may look like this:

      /dev/sdh1        56M   20M   37M  36% /media/flogiston/boot
      /dev/sdh2        15G  3,9G   10G  28% /media/flogiston/c1398422-7a7c-4863-8a8f-45a1db26b4f2

=>

    • As you can see the value of X is h in my case.  Do NOT use /dev/sdh2, just use /dev/sdh in the example above.  This will ensure that you will copy all partitions into the image

 

  • /media/flogiston/SomeDrive/data => replace with path were you want your image to be saved

This may take a while.  The larger your SD card, the longer this will take.  Think half an hour or more.  Time to get a coffee or some rest.

After your image has been created you can now fix it.

  • Determine the starting block of each partition
parted /media/flogiston/SomeDrive/data/raspberry-complete.img unit B print

This will look a bit like:

Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start      End           Size          Type     File system  Flags
 1      4194304B   62914559B     58720256B     primary  fat16        lba
 2      62914560B  15811477503B  15748562944B  primary  ext4

Set up a loop device for each of the partitions:

use the Start bytes from the parted cmd to set up the loop devices:

➜  ~ sudo losetup -o 4194304 /dev/loop2 /media/flogiston/SomeDrive/data/raspberry-complete.img
➜  ~ sudo losetup -o 62914560 /dev/loop3 /media/flogiston/SomeDrive/data/raspberry-complete.img

Now we can repair the image

sudo fsck -y /dev/loop2
sudo fsck -y /dev/loop3

This could look a bit like:

➜  ~ sudo fsck -y /dev/loop2
fsck from util-linux 2.27.1
fsck.fat 3.0.28 (2015-05-16)
/dev/loop2: 64 files, 2519/7161 clusters
➜  ~ sudo fsck -y /dev/loop3
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/loop3: recovering journal
Clearing orphaned inode 525978 (uid=107, gid=65534, mode=0100755, size=5)
Setting free inodes count to 830406 (was 830407)
Setting free blocks count to 2769926 (was 2769152)
/dev/loop3: clean, 134362/964768 files, 1074938/3844864 blocks

Detach the image associated with the specified loop devices

➜  ~ sudo losetup -d  /dev/loop2
➜  ~ sudo losetup -d  /dev/loop3

Now the image should be repared.  We no longer trust the old SD card and use a brand new one to copy the repared image to:

sudo dd if=/media/flogiston/SomeDrive/data/raspberry-complete.img of=/dev/sdh

If you are out of luck, then the new SD card is a few bytes smaller then the other one.  You will have to truncate the image (shave off some bytes at the end) to make it fit.

dd: writing to '/dev/sdh': No space left on device
30449665+0 records in
30449664+0 records out
15590227968 bytes (16 GB, 15 GiB) copied, 3830,5 s, 4,1 MB/s

I guess I was out of luck …

sudo apt install dcfldd
sudo apt install gparted
➜  ~ sudo losetup -o 62914560 /dev/loop3 /media/flogiston/SomeDrive/data/raspberry-complete.img
➜  ~ sudo gparted /dev/loop3     

gparted starts. Select the the /dev/loop3 partition and select Partition menu, Resize/Move . Change the value of “New Size” so that it is slightly below the maximum size. Eg. 100MB free space. Resize, apply all operations and wait. Wait. Wait!

DO NOT close the window after it is finished.  When complete, it will display the new size. Make sure you write down the new size before you close the window.  If you don’t see, it, click on details and drill down to the new size (a line like “resize2fs -p /dev/loop3 14980096K”) where the number in K is the new size in kilobytes.

Now remove the loopback device for the second partition, create a new loopback device for the whole image and edit the partition table to reflect the new smaller size:

sudo losetup -d /dev/loop3
sudo losetup /dev/loop3 /media/flogiston/SomeDrive/data/raspberry-complete.img
sudo fdisk /dev/loop3
d
2
n
p
2
122880
+14980096K
w
➜  ~ sudo fdisk -l /dev/loop3        
Disk /dev/loop3: 14,7 GiB, 15811477504 bytes, 30881792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000c45c9

Device       Boot  Start      End  Sectors  Size Id Type
/dev/loop3p1        8192   122879   114688   56M  c W95 FAT32 (LBA)
/dev/loop3p2      122880 30083071 29960192 14,3G 83 Linux
➜  ~ sudo losetup -d /dev/loop3
➜  ~ truncate -s $(((30083071+1)*512)) /media/flogiston/SomeDrive/data/raspberry-complete.img
sudo dcfldd if=/media/flogiston/SomeDrive/data/raspberry-complete.img of=/dev/sdh

Eject your new SD card, plug in to your Pi and reboot… Fingers crossed!

Source: http://www.aoakley.com/articles/2015-10-09-resizing-sd-images.php
Source: https://www.raspberrypi.org/forums/viewtopic.php?t=19468

Online tool: CSV to JSON

A nifty client-side (javascript) tool to convert a csv dataset to json

http://www.cparker15.com/code/utilities/csv-to-json/
And the source code: https://github.com/cparker15/csv-to-json

I placed a copy on my own site, for future reference
http://www.flogiston.net/datagenerator/csv-to-json.html

OpenVPN error: Warning: route gateway is not reachable on any active network adapters

Windows XP: disabling NetBIOS

  1. Open your Control Panel
  2. Open the Network Connections window
  3. Right-click the TAP-Win32 adapter and select Properties
  4. Select Internet Protocol (TCP/IP) and click Properties
  5. Click Advanced and select the WINS tab
  6. Select Disable NetBIOS over TCP/IP
  7. Click OK and close all the settings windows
  8. Try to connect to the VPN. If the problem is not resolved, continue to the next step.

Windows XP: adding netsh

  1. Click the OpenVPN icon in the taskbar
  2. Select the server you would normally try to connect to, but instead of connecting, choose Edit Config
  3. A notepad window will open with a few lines of technical text. Please don’t change any of the lines
  4. At the end of the file, one new line, please add the following 3 lines:
  5. route-delay 5
  6. route-method exe
  7. ip-win32 netsh
  8. Save and close the file.
  9. Try to connect and see if this helped.
Windows Vista / 7: adding netsh
  1. Click the OpenVPN icon in the taskbar
  2. Select the server you would normally try to connect to, but instead of connecting, choose Edit Config
  3. A notepad window will open with a few lines of technical text. Please don’t change any of the lines
  4. If you installed our most up-to-date installer for Windows Vista/Windows XP, the last 2 lines of the file should be:
  5. route-delay 5
  6. route-method exe
  7. If not, then please follow the Windows XP instructions.
  8. At the end of the file, one new line, please add the following 3 lines:
  9. ip-win32 netsh
  10. Save and close the file.
  11. Try to connect and see if this helped.

Windows XP: resettings Internet catalog

  1. Find the Command Prompt option in your Start Menu
  2. Right-click the Command Prompt option and select Run as administrator
  3. Once started a black window will appear, waiting for you to type commands
  4. Enter the following two commands, each followed by the ENTER key:
  5. netsh winsock reset catalog
  6. netsh int ip reset logfile.txt
  7. Make sure these commands did not you give you an error.
  8. Close the Command Prompt window and try to connect.

Windows Vista / 7: resettings Internet catalog

 

  1. Find the Command Prompt option in your Start Menu
  2. Right-click the Command Prompt option and select Run as administrator
  3. Once started a black window will appear, waiting for you to type commands
  4. Enter the following two commands, each followed by the ENTER key:
  5. netsh winsock reset
  6. netsh int ip reset 
  7. Make sure these commands did not you give you an error.
  8. Close the Command Prompt window and try to connect.

 

 

source:
http://my.anuson.com/knowledgebase/61/OpenVPN-error-Warning-route-gateway-is-not-reachable-on-any-active-network-adapters.html

de / het woorden (Dutch)

de / het woorden zijn woorden die zowel onzijdig (het) als geslachtelijk zijn.

Andere betekenis

Soms heeft een het woord een andere betekenis dan hetzelfde de woord. Zo’n voorbeeld is idee.

Het idee betekent: ‘denkbeeld’, ‘gedachte’, ‘denkwijze’, ‘ingeving’, ‘mening’. Bijvoorbeeld:
– iemand op het idee brengen dat…
– dat idee moet je aan het bestuur voorleggen
– een goed idee hebben
– naar ons idee kan ze dat best

De idee betekent: ‘(filosofisch) denkbeeld’, ‘gedachte’. Bijvoorbeeld:
– de godsidee
– de platonische idee
– de marxistische idee
– de idee van het recht
– uit heel zijn werk komt duidelijk de volgende idee naar voren…

Woorden op -dom

Woorden op -dom zijn meestal het -woorden. Het zijn dan namen van plaatsen of gebieden (bijv. het bisdom, het heiligdom, het hertogdom ) ofwel verzamelnamen (bijv. het jodendom, het priesterdom, het regentendom, het veelgodendom ). Abstracta op -dom zijn de -woorden (bijv. de rijkdom, de ouderdom ).

Woorden op -schap

Bij de veel talrijker woorden op -schap zijn tweemaal twee categorieën te onderscheiden. Bij de de -woorden zijn deze twee categorieën:

  • substantieven die een toestand aanduiden, bijv.: de blijdschapdronkenschapgevangenschapkameraadschaplijfeigenschapverwantschapvriendschapzwangerschap
  • verzamelnamen, bijv.: de gemeenschapnakomelingschapnalatenschapvennootschap
  • maar: het genootschapgereedschapgezelschap en het driemanschap (en de mogelijke, maar minder gebruikelijke woorden tweemanschapviermanschap, enz.).

Woorden met de-genus die niet tot een van deze categorieën gerekend kunnen worden, zijn bijv.: de boodschapeigenschaprekenschapweddenschapwetenschap

Bij de het-woorden zijn eveneens twee categorieën te onderscheiden:

  • substantieven die een functie of relatie aanduiden, bijv.: het kindschapkampioenschapkoningschappremierschapvaderschapvoogdijschap
  • substantieven die een instituut aanduiden, bijv.: het agentschapgezantschaphoogheemraadschapindustrieschaplandbouwschap

Woorden met het-genus die niet tot een van deze categorieën gerekend kunnen worden, zijn bijv.:  het graafschapheerschaplandschap

Soms kan een woord op -schap tot twee van de hierboven onderscheiden categorieën behoren en in overeenstemming daarmee met verschillend genus gebruikt worden, bijv. de priesterschap‘de gezamenlijke priesters’ en het priesterschap‘de priesterlijke waardigheid’. Het woord de/het zeggenschap komt zonder betekenisverschil met beide genera voor.

Stofnamen  [ 3·3·2·4·i·2 ] 
Stofnamen kunnen de– en het-woorden zijn, bijv. de wolde zij(de) , maar het houthet papier ; het -woorden zijn bijv. ook het chintzhet denim en het teak , evenals de namen van metalen .
Wanneer substantieven als stofnaam en als voorwerpsnaam gebruikt kunnen worden, is de stofnaam dikwijls het-woord en de voorwerpsnaam de-woord. Zo bijv. bij namen van edelstenen (zoals diamantrobijntopaas ); vergelijk:

(1a) Het diamant dat wij verhandelen, wordt vooral voor industriële doeleinden gebruikt. (stofnaam)
(1b) De diamant in die ring vind ik niet mooi. (voorwerpsnaam)

Andere voorbeelden zijn:

(2a) Die mantel is van echt nerts. (het-woord)
(2b) De nerts is een kleine visotter.
(3a) Het kurk hieromheen is helemaal vergaan.
(3b) Waar is de kurk van die fles?

Voor het laatste paar voorbeelden geldt overigens dat kurk ook als stofnaam de-woord kan zijn.
Ook een groot aantal andere stofnamen komt als de– en het-woord voor. Het onzijdig genus kan geacht worden het meest voor te komen bij:het/de acetonbalatumbamboebarnsteenbenzolbessensapcarbolcementcheviotcompostcorduroydoekdraadfibergrindgummiinsecticideinterlockkiezelkurk,leemlinoleumlysolmajolicanylonozonparfumpekpluchepoederpoeletpolitoerpusrayonrotansatinetshantoengslijmsnotsoldeersolfer/sulfersuèdetriplex,veloursveronalvitriool

. Stofnamen die meestal als de-woord gebruikt worden, zijn bijv.:de/het antracietappelmoesbaconbeitschloordrabdropfondantfosforgomhacheeharskaneelkatoenkitknoflookkwijllaklatexleukoplastloogmacadam,marsepeinmelangemolmmousselinemoutnapalmopiumpastapils(ener)plamuurpopelineraffiaroestrougesalpeterspeculaasstijfselstouttaaitaaitafteer,terracottavitragewaszavel

. Het genusgebruik is onduidelijk bij:de of het kauwgomrubbersmeersteentextielvernis

Andere substantieven  [ 3·3·2·4·i·3 ] 
Andere substantieven die met betekenisverschil als de– en als het-woord kunnen optreden, zijn bijv.:aasde/het aas (in kaartspel) – het aas (‘voedsel’);
afvalde afval (‘het afvallen’) – het/de afval (‘het afgevallene’; ‘vuilnis’);
baaide baai (‘zeearm’; ‘tabak’) – de of het baai (weefsel);
balde bal (voorwerp) – het bal (‘ feest’);
blikde blik (‘oogopslag’) – het blik (metaal; voorwerp);
bloedde (onnozele) bloed – het bloed (‘lichaamsvocht’);
bochtde bocht (‘kromming’) – het/de bocht (‘slechte waar’);
boekethet/de boeket (‘bloemruiker’) – het boeket (‘geur en smaak’);
boordde boord (‘rand, kant’) – de of het boord (‘kraag’; van schip);
bosde bos (‘bundel’) – het bos (‘ woud’);
botde bot (vis) – het bot (‘ been’);
buisde buis (‘pijp’) – het buis (kledingstuk);
doekde doek (‘lap’) – het doek (‘ schilderij’; ‘gordijn’) (n.b Als stofnaam het/de doek: zie ***EMPTY ra r5***.);
duinde of het duin (‘zandheuvel’) – het duin (verzamelnaam);
eigendomde eigendom (recht) – het eigendom (‘wat iemand toebehoort’);
fortuinde fortuin (‘(nood)lot’) – het fortuin (‘geld’; ‘geluk’);
gemaalde gemaal (‘echtgenoot’) – het gemaal (andere betekenissen);
geniede genie (legeronderdeel) – het genie (andere betekenissen);
giftde gift (‘geschenk’) – het gif(t) (‘vergif’);
grauwde grauw (‘snauw’) – het grauw (‘gepeupel’);
heerde heer (persoonsnaam) – het heer (‘leger’; ‘heerschap’);
hofde hof (‘tuin’) – het hof (andere betekenissen);
ideede idee (filosofische term) – het idee (‘denkbeeld’);
jachtde jacht (‘het jagen’) – het jacht (boot);
kampde kamp (‘strijd’) – het kamp (‘ tijdelijke woonplaats’);
kapitaalde kapitaal (‘hoofdletter’) – het kapitaal (‘geld’);
kladde klad (‘smet’) – het klad (‘ voorlopige versie’);
koppelde koppel (‘band’) – het koppel (‘stel’);
koraalde koraal (‘kraal’) – het koraal (stofnaam; gezang);
kwartde kwart (muziekterm) – het kwart (‘vierde’);
lekde lek (‘het lekken’) – het lek (‘scheur, reet waaruit iets lekt’);
licentiaatde licentiaat (persoon) – het licentiaat (graad);
lofde lof (‘eerbetuiging’) – het lof (andere betekenissen);
maalde maal (‘keer’) (echter ook: dit maal) – het maal (‘maaltijd’);
mensde mens (algemeen) – het mens (‘ vrouw’) ;
metaalde metaal (bedrijfssector) – het metaal (stofnaam);
moerde moer (‘vlak lichaam waarin een gat met schroefdraad aan de binnenzijde’; ‘vrouwelijk wezen’) – het moer (‘veenmoeras’);
omslagde omslag (‘drukte’; ‘verandering’; ‘verdeling’) – de/het omslag (andere betekenissen);
opzetde opzet (andere betekenissen dan ‘voornemen’; ‘bedoeling’) – het opzet (‘voornemen’; ‘bedoeling’);
padde pad (dier) – het pad (‘ weg’);
patroonde patroon (persoonsnaam; ‘huls met lading’) – het patroon (‘model’; ‘tekening’);
pleisterde pleister (op een wond) – het pleister (stofnaam);
portde port (wijn) – de/het port(o) (‘vrachtloon’);
portierde portier (persoonsnaam) – het portier (‘deur’);
puntde punt (‘spits’); de/het punt (‘leesteken’) – het punt (andere betekenissen);
reede ree (‘rede’) – de/het ree (dier);
rekde rek (‘het rekken’) – het rek (andere betekenissen);
rijmde rijm (‘rijp’) – het rijm (‘ klankgelijkheid’; ‘gedicht’);
rotde rot (‘rat’) – het rot (andere betekenissen);
schaphet/de schap (‘plank’) – het schap (‘bedrijfschap’);
schriftde Schrift (‘Bijbel’) – het schrift (andere betekenissen);
slagde slag (andere betekenissen dan ‘soort’) – het slag (‘soort’);
sloopde sloop (‘het slopen’) – de/het sloop (‘kussenovertrek’);
soortde soort (in de biologie) – het of de soort (andere betekenissen);
spoorde spoor (‘spore’; ‘uitsteeksel’) – het spoor (andere betekenissen);
stempelde stempel (deel van een plant; steunbalk) – de of het stempel (‘stempelwerktuig’; ook figuurlijk) – het stempel (‘stempelafdruk’; ook figuurlijk);
stiftde stift (‘staafje’) – het stift (‘klooster’);
stofde stof (andere betekenissen dan ‘stuifsel’) – het stof (‘stuifsel’);
substituutde substituut (persoonsnaam) – het substituut (zaaknaam);
textielde textiel (bedrijfssector) – de of het textiel (stofnaam);
themade/het thema (schoolopgave) – het thema (‘onderwerp’);
toevalde/het toeval (‘aanval van (vallende) ziekte’) – het toeval (‘onberekenbaar gebeuren’);
veerde veer (van vogel; ‘springveer’) – het veer (‘pont’);
vizierde vizier (persoonsnaam) – het vizier (andere betekenissen);
vlakde vlak (‘smet’) – het vlak (andere betekenissen);
vlekde vlek (‘smet’) – het vlek (‘ dorp’);
vochtde of het vocht (‘vochtigheid’) – het vocht (‘vloeistof’);
wantde want (‘handschoen’) – het want (‘touwwerk’);
wasde was (andere betekenissen dan de stofnaam) – de/het was (stofnaam);
weede wee (‘barenswee’) – het wee (andere betekenissen);
weerde weer (in de uitdrukking in – zijn; ook in samenstellingen als brandweer en noodweer) – het weer (‘atmosferische toestand’);
weerlichtde weerlicht (krachtterm) – het/de weerlicht (natuurverschijnsel);
welpde welp (‘jonge padvinder’) – de/het welp (jong van bepaalde dieren);
wisselde wissel (andere betekenissen dan ‘spoorwegwissel’) – de/het wissel (‘spoorwegwissel’);
wurmde wurm (‘worm’) – het wurm (‘ kind’);
zegelde zegel (‘plakzegel’) – het zegel (andere betekenissen);
zichtde zicht (‘kleine zeis’) – het zicht (andere betekenissen)

Regionale verschillen

Soms zijn er regionale verschillen:
In België wordt thuis opgevat als de-woord, in Nederland als het-woord.

Evolutie van een woord

Of evolueert een woord met de loop der tijd:
Engelse leenwoorden krijgen gewoonlijk het lidwoord de. Van sommige Engelse leenwoorden komt na verloop van tijd echter ook een het-vorm in omloop. Met cluster lijkt dit ook het geval te zijn: de meeste naslagwerken geven de cluster (mannelijk), maar sommige ook het cluster (onzijdig).
Procent is volgens de woordenboeken een het-woord. In de praktijk wordt procent echter steeds meer ook als de-woord gebruikt. In België is dat vaker het geval dan in Nederland.

Contextuele verschillen

Heel af en toe zijn er context verschillen:

Zowel de nuclide als het nuclide is goed. In gewoon taalgebruik wordt meestal de nuclide gebruikt. In wetenschappelijke teksten komt vaak het nuclide voor.
Het zelfstandig naamwoord spits (onder andere ‘puntig uiteinde’) wordt doorgaans voorafgegaan door het lidwoord de. Alleen in de vaste uitdrukkingen de/het spits afbijten (‘de eerste in de aanval zijn’, ‘iets als eerste doen’) en de/het spits bieden aan (‘zich krachtig verzetten tegen’) kan het woord ook onzijdig zijn. In de Woordenlijst wordt spits echter alleen als de-woord vermeld.
Zo is in het algemene taalgebruik microscoop een de-woord; het microscoop is beperkt tot technisch taalgebruik. Iets dergelijks geldt voor het algoritme tegenover de algoritme (vaktaal) en voor de haas, de patrijs en de ree naast het haas, het patrijs en het ree , gebruikelijk in jagerstaal.

“Echte” de/het woorden: geen betekenisverschil

Hier volgen enkele van de bekendste voorbeelden van zelfstandige naamwoorden die zowel de-woord als het-woord kunnen zijn zonder dat er sprake is van een betekenisverschil: aanrecht, affiche, colofon, deksel, doolhof, fabriek (het fabriek is regionaal en ‘volkstaal’), getuigenis (zie vuilnis), gordijn, kaft, klimop, modem, molecule, periodiek, scala, soort, tenue, uniform (in Nederland zijn tegenwoordig het tenue en het uniform ook onder militairen het meest gebruikelijk, bijvoorbeeld het gevechtstenue, het dagelijkse tenue; daarnaast wordt nog wel gesproken van de geklede en de ceremoniële tenue), vuilnis (bijna alle woorden op -nis zijn vrouwelijk; de vuilnis is dan ook ouder, maar voor de verzamelnaam vuilnis is het lidwoord het gewoon geworden).

Hieronder volgen drie reeksen van woorden die in de standaardtaal zonder betekenisverschil als de- en als het-woord gebruikt kunnen worden. Woorden die in een bepaalde betekenis dubbel genus kunnen hebben en in een andere betekenis niet (bijv. het/de bocht ‘slechte waar’ tegenover de bocht’kromming’) zijn vermeld in en worden hier niet herhaald.
Het de-genus komt het meest voor bij:
de/het accordeon, animo, automatiek, bagatel, boezeroen, brio, carrousel, circumflex, corsage, diadeem, figuur, filet, filter, floret, foetus, handel/hendel, heethoofd, hippodroom, hocus-pocus, hondsvot, introïtus, jolijt, kaft, karwei, katern, keer (deze keer, maar ook: dit keer; vergelijk maal ), kilo, klimop, koliek, kraam, lidmaat, liniaal, lis (‘plant’), lorgnet, manoeuvre, matras, mechaniek, molecule, mortier, order, orgelpunt, oriënt, pancreas, parterre, pipet, pleuris/pleuritis, potpourri, prae, proviand, ratjetoe, reliek, remedie, retabel, roodvonk, salon, scheurbuik, schort, schurft, sex-appeal, solo, soort, status, subsidie, takel, teint, transfer, uitwas, uitzet, vendu, voldoende, voorschoot, welp, zadel, zeggenschap, zuivel

. Het het-genus komt het meest voor bij:
het/de aanrecht, affiche, aperitief, baldakijn, bidet, bruikleen, carillon, carré, chalet, circus, colbert, colofon, commentaar, concours, creatuur, debacle, depot, deksel, dressoir, embonpoint, ex-voto, factotum, festoen, feuilleton, fiche, fond, galon, gamma (‘geordende reeks’), getuigenis, gilde, gobelin, gordijn, hiaat, idee-fixe, imperiaal, impromptu, jacquet, karkas, klavecimbel, koord, leeghoofd, lef, loeder, lor, membraan, mengelmoes, menu, menuet, micron, mom, montuur, mud, octaaf, omnium, overtrek, pandoer, pedaal, pendant, periodiek, pincet, plastron, plus, raster, riool, risico, rooster, scapulier, scharminkel, schepel, schilderij, schrijn, silhouet, slem, stencil, stort (‘stortplaats’), struma, tabernakel, taboe, tenue, tribuut, uniform, vereiste, vergiet, viaduct, vod, voltage, vuilnis, warhoofd, zadel, zijspan

. Het genus is onduidelijk bij:
de of het appendix, brok, complet, facie, fries (in de bouwkunst), kameleon, kruim, piëdestal, poeha, prospectus, tablet

Bronnen:
http://taaladvies.net/taal/advies/vraag/1168
http://taaladvies.net/taal/advies/vraag/525
http://taaladvies.net/taal/advies/vraag/556
http://taaladvies.net/taal/advies/vraag/169
http://ans.ruhosting.nl/e-ans/03/03/02/04/body.html

Utility to upgrade a Joomla 1.5 template to 1.7

I’ve made a utility to upgrade a Joomla 1.5 template to make it compatible with 1.7.
Try it out here.

I’ve only tried it out on one template, so be very carfull when you try it: backup your original data or try it out on a local environment before installing it on a production environment.

If you used and liked this utility, consider donating some money so I can enjoy a nice cigar or a fine whisky. I’d appreciate it!










Regex: match 4 or more consecutive letters or numbers

([a-z-0-9])\1{3,}

Sites to test:
http://www.regexplanet.com/simple/
http://www.rubular.com/
http://www.cyber-reality.com/regexy.html
http://www.spaweditor.com/scripts/regex/index.php

Extract winmail.dat files in linux

Source: http://www.faqforge.com/linux/how-to-open-winmail-dat-files-on-ubuntu-or-debian-linux/

The winmail.dat file is a container file format used by Microsoft Outlook to send attachments in richtext formatted emails. To open winmail.dat on Linux, use the tnef utility.
Installation

sudo apt-get install tnef

Usage
Open a shell window, navigate to the directory where the winmail.dat file is saved, then execute the command:

tnef winmail.dat

to extract all files that are stored in the winmail.dat into the current directory.

Repair corrupted zipfiles in linux

Source: http://techie-buzz.com/foss/fix-corrupted-zip-files-in-linux-quick-tip.html

You can easily repair “repairable” zip files downloaded on Linux by issuing the following command;

zip –F 'filename.zip'

Issuing this command will tell the zip command to try to fix the zipfile if necessary. You can also issue the following command to make it the zip command work more harder on fixing the zip file.

zip –FF 'filename.zip'

Funny source code comments

http://cobaia.net/2010/09/top-funny-source-code-comments/
and the original
http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered

And, on a slightly related note … xkcd … http://xkcd.com/210/

Argument list too long

Source:http://www.linuxjournal.com/article/6060?page=0,0

Four approaches to getting around argument length limitations on the command line.
At some point during your career as a Linux user, you may have come across the following error:

[user@localhost directory]$ mv * ../directory2
bash: /bin/mv: Argument list too long
The “Argument list too long” error, which occurs anytime a user feeds too many arguments to a single command, leaves the user to fend for oneself, since all regular system commands (ls *, cp *, rm *, etc…) are subject to the same limitation. This article will focus on identifying four different workaround solutions to this problem, each method using varying degrees of complexity to solve different potential problems. The solutions are presented below in order of simplicity, following the logical principle of Occam’s Razor: If you have two equally likely solutions to a problem, pick the simplest.

Method #1: Manually split the command line arguments into smaller bunches.

Example 1

[user@localhost directory]$ mv [a-l]* ../directory2
[user@localhost directory]$ mv [m-z]* ../directory2

This method is the most basic of the four: it simply involves resubmitting the original command with fewer arguments, in the hope that this will solve the problem. Although this method may work as a quick fix, it is far from being the ideal solution. It works best if you have a list of files whose names are evenly distributed across the alphabet. This allows you to establish consistent divisions, making the chore slightly easier to complete. However, this method is a poor choice for handling very large quantities of files, since it involves resubmitting many commands and a good deal of guesswork.

Method #2: Use the find command.

Example 2

[user@localhost directory]$ find $directory -type f -name '*' -exec mv
{} $directory2/. \;

Method #2 involves filtering the list of files through the find command, instructing it to properly handle each file based on a specified set of command-line parameters. Due to the built-in flexibility of the find command, this workaround is easy to use, successful and quite popular. It allows you to selectively work with subsets of files based on their name patterns, date stamps, permissions and even inode numbers. In addition, and perhaps most importantly, you can complete the entire task with a single command.

The main drawback to this method is the length of time required to complete the process. Unlike Method #1, where groups of files get processed as a unit, this procedure actually inspects the individual properties of each file before performing the designated operation. The overhead involved can be quite significant, and moving lots of files individually may take a long time.

Method #3: Create a function. *

Example 3a

function large_mv ()
{       while read line1; do
                mv directory/$line1 ../directory2
        done
}
ls -1 directory/ | large_mv

Although writing a shell function does involve a certain level of complexity, I find that this method allows for a greater degree of flexibility and control than either Method #1 or #2. The short function given in Example 3a simply mimics the functionality of the find command given in Example 2: it deals with each file individually, processing them one by one. However, by writing a function you also gain the ability to perform an unlimited number of actions per file still using a single command:

Example 3b

function larger_mv ()
{       while read line1; do
                md5sum directory/$line1 >>  ~/md5sums
                ls -l directory/$line1 >> ~/backup_list
                mv directory/$line1 ../directory2
        done
}
ls -1 directory/ | larger_mv

Example 3b demonstrates how you easily can get an md5sum and a backup listing of each file before moving it.

Unfortunately, since this method also requires that each file be dealt with individually, it will involve a delay similar to that of Method #2. From experience I have found that Method #2 is a little faster than the function given in Example 3a, so Method #3 should be used only in cases where the extra functionality is required.

Method #4: Recompile the Linux kernel. **
This last method requires a word of caution, as it is by far the most aggressive solution to the problem. It is presented here for the sake of thoroughness, since it is a valid method of getting around the problem. However, please be advised that due to the advanced nature of the solution, only experienced Linux users should attempt this hack. In addition, make sure to thoroughly test the final result in your environment before implementing it permanently.

One of the advantages of using an open-source kernel is that you are able to examine exactly what it is configured to do and modify its parameters to suit the individual needs of your system. Method #4 involves manually increasing the number of pages that are allocated within the kernel for command-line arguments. If you look at the include/linux/binfmts.h file, you will find the following near the top:

/*
 * MAX_ARG_PAGES defines the number of pages allocated for   arguments
 * and envelope for the new program. 32 should suffice, this gives
 * a maximum env+arg of 128kB w/4KB pages!
 */
#define MAX_ARG_PAGES 32

In order to increase the amount of memory dedicated to the command-line arguments, you simply need to provide the MAX_ARG_PAGES value with a higher number. Once this edit is saved, simply recompile, install and reboot into the new kernel as you would do normally.

On my own test system I managed to solve all my problems by raising this value to 64. After extensive testing, I have not experienced a single problem since the switch. This is entirely expected since even with MAX_ARG_PAGES set to 64, the longest possible command line I could produce would only occupy 256KB of system memory–not very much by today’s system hardware standards.

The advantages of Method #4 are clear. You are now able to simply run the command as you would normally, and it completes successfully. The disadvantages are equally clear. If you raise the amount of memory available to the command line beyond the amount of available system memory, you can create a D.O.S. attack on your own system and cause it to crash. On multiuser systems in particular, even a small increase can have a significant impact because every user is then allocated the additional memory. Therefore always test extensively in your own environment, as this is the safest way to determine if Method #4 is a viable option for you.