+++ /dev/null
-drwxr-xr-x 2 ftp ftp 4096 Mar 19 08:41 .\r
-drwxr-xr-x 3 ftp ftp 4096 Mar 19 08:41 ..\r
--rw-r--r-- 1 ftp ftp 2859 Mar 19 08:37 dvorak-0.74.map\r
--rw-r--r-- 1 ftp ftp 10240 Mar 19 08:35 dvorak_dos.tar\r
+++ /dev/null
-dd13e096acf6b9b95cace6943fe56577 dvorak-0.74.map
-85f82d281bc3d4e48e375193fdaada66 dvorak_dos.tar
3d85a9b435eb833de088e45c3f56e49c ./dvorak.html
9e5b7702d73bfb7febb24bf58f0e8d60 ./hashes.txt
-029ca90462962a4dbcc632e7cb87ce2a ./index.html
+198a371dd238282e3fa78732be9fbfdb ./index.html
72ac29b74f3e09c551aa10a2a8d2581d ./lejos-ubuntu.html
0ba6cb2c3a9d7d8ba27406d215aa501e ./mart@martlubbers.net.asc
-146f1bb6bed2adfd4d13f9644390db71 ./nsa-dropbox.html
75068866762dc200d6e185bfe9b3a2bf ./o.html
ce31052406b3874b287e98c8a9477516 ./p.jpg
-95b2932b7da95664dcef20097b1b58df ./put.bash
+e0242c7228f6ef8da9747516c597f52c ./put.bash
43eb61826bc538817b4c78c7f8d57019 ./README.md
4be5b32df3dedb74eeb758b233864fe6 ./robots.txt
-04c8dd2c53feada9530fcdba9285c016 ./style.css
d69f225d06c3d7a417fb5e8159efc2d1 ./test.php
-2ed34aa229468632cce58151c33d1ebc ./wlan-debian.html
-d07dca8f45b3f046558216cf3ac96c28 ./youtube-term.html
+146f1bb6bed2adfd4d13f9644390db71 ./archive/nsa-dropbox.html
+2ed34aa229468632cce58151c33d1ebc ./archive/wlan-debian.html
+d07dca8f45b3f046558216cf3ac96c28 ./archive/youtube-term.html
+dd13e096acf6b9b95cace6943fe56577 ./files/dvorak-0.74.map
+85f82d281bc3d4e48e375193fdaada66 ./files/dvorak_dos.tar
+b92c31cd0dfde6e6e8322d2163f0d728 ./files/phonetic_dvorak.gz
<h3>Other Interests</h3>
<p>
- - Death/Doom metal<br />
- - Hacking<br />
- - <a href="http://www.howchuenmonkeykungfu.nl">Kung fu</a><br />
- - <a href="http://linuxnijmegen.nl">Linux</a><br />
- - Pokémon
+ <ul>
+ <li>Death/Doom metal</li>
+ <li>Hacking</li>
+ <li><a href="http://www.howchuenmonkeykungfu.nl">Kung fu</a></li>
+ <li><a href="http://linuxnijmegen.nl">Linux</a></li>
+ <li>Pokémon</li>
+ </ul>
</p>
<h3>Suspended projects/archive</h3>
+++ /dev/null
-<html>
- <head>
- <title>Use any untrusted cloud storage with encryption</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <h3>PREREQUISITES</h3>
- Install encfs and fuse<br />
-<pre># apt-get install fuse encfs</pre>
- Install a cloud service(copy.com used here)(assuming ~/bin is in your path and running on a 64bits machine)<br />
- When using a different architecture just change x86_64 to x86 or armv6h in the client install script<br />
- If ~/bin is not in your path add to your bashrc(example using user: test):
-<pre>PATH=$PATH:/home/test/bin</pre>
- Download and install the copy client for linux
-<pre>
-$ wget https://copy.com/install/linux/Copy.tgz
-$ mkdir ~/bin/copy; tar -xf Copy.tgz -C ~/bin/copy
-$ ln -s ~/bin/copy/x86_64/CopyConsole ~/bin/CopyConsole
-</pre>
- <h3>SETUP</h3>
- <p>Make sure your user is in the fuse group and setup the encfs share by doing this:
-<pre>
-$ mkdir ~/.copy.encr ~/copy
-$ encfs ~/.copy.encr ~/copy
-</pre>
- When they ask use option p for paranoia and pick a password.<br />
- Create an account on copy.com and setup the client by typing this command
-<pre>$ CopyConsole -u=the_mail_you_signed_up_with -r=/home/your_linux_username/.copy.encr -p=the_password_you_signed_up_with</pre>
- This creates a setup that does this automatically in the future<br />
- Let the daemon and the encfs autostart when you and only you are logged in by adding this to ~/.bashrc
-<pre>
-if ! mountpoint -q ~/copy; then
- encfs ~/.copy.encr ~/copy
-fi
-if ! pidof CopyConsole >> /dev/null; then
- CopyConsole -daemon 2>&1 1>/dev/null
-fi
-</pre>
- Congratulations your setup is working. <br />
- When you want to stop the daemon you can kill the pid given by ~/.copy.pid.<br />
- From now on your computer or server will ask one time for you password when the first bash starts in your account.</p>
-
- <h3>NOTES</h3>
- <p>This could work with any cloud service, just mount the folder it wil sync first with encfs</p>
- </body>
-</html>
#!/bin/bash
set -e
-for f in $(find . -type f -not -name "*hashes*" | grep -v "put\|/\.\|^\.$\|/$")
+files=$(find . -type f -not -iwholename "*.git*")
+user=$(gpg -q --use-agent -d ~/pw/general.asc | grep ftpmartlubbers.net -A3 | grep -Po "(?<=user: ).*")
+pass=$(gpg -q --use-agent -d ~/pw/general.asc | grep ftpmartlubbers.net -A3 | grep -Po "(?<=pass: ).*")
+
+for f in $files
do
- dir=$(dirname $f)
- if [ "$(md5sum $f | awk '{print $1}')" = "$(grep $(basename $f) $dir/hashes.txt | awk '{print $1}')" ]
+ origmd5=$(grep "$f" ./hashes.txt | awk '{print $1}')
+ currmd5=$(md5sum "$f" | awk '{print $1}')
+ if [ "$origmd5" = "$currmd5" ]
then
- echo "$f didn't change..."
+ echo "$f is not changed"
else
- echo "$f did change..."
- curl -u $(gpg --use-agent -d ~/passwd.gpg | grep ftp-user | awk '{print $2":"$3}') -T $f ftp://martlubbers.net/public_html/$f
+ echo "$f is changed"
+ curl -u "$user:$pass" -T $f ftp://martlubbers.net/public_html/$f
fi
done
-echo "recalculating hashes"
-md5sum ./* > hashes.txt
-cd files
-md5sum ./* > hashes.txt
-cd ..
+md5sum ./*{,/*} > ./hashes.txt
+++ /dev/null
-<html>
- <head>
- <title>Automatic wifi without heavy network manager on debian</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <h3>PREREQUISITES</h3>
- <p>Install wpa_supplicant and wireless-tools(standard in most distros).<br />
-<pre># apt-get install wireless-tools wpa_supplicant</pre>
- <br />
- Identify your wifi controller. This can usually be found by typing<br />
- <pre>$ iwconfig</pre>
- <br />
- Locate all the config files for your desired networks. Mine are placed in /etc/network/wifi/<SSID>.conf. More info on creating configs in the end of the file.</p>
-
- <h3>INSTALLATION</h3>
- <p>Create the SSID selection script.<br />
- I've put mine in /etc/network/wifi/select<br />
-<pre>
-#!/bin/sh
-ifconfig [INTERFACE] up 1> /dev/null && { iwlist [INTERFACE] scan | grep -o "\".*\"" | tr -d \'\" | sort | uniq; grep -o "map\ .*" /etc/network/interfaces | awk '{print $2}'; } | sort | uniq -d | head -1
-</pre>
- <br />
- Make it executable.<br />
- <pre># chmod +x /etc/network/wifi/select</pre>
- <br />
- Change in /etc/network/interfaces the [INTERFACE] specification.<br />
-<pre>
-mapping [INTERFACE]
- script /etc/network/wifi/select
- map [SSID]1
- map [SSID]2
- ..
- map eduroam
-
-iface [SSID]1 inet dhcp
-wpa_conf /etc/network/wifi/[SSID]1.conf
-
-iface [SSID]2 inet dhcp
-wpa_conf /etc/network/wifi/[SSID]2.conf
-
-..
-
-iface eduroam inet dhcp
-wpa_conf /etc/network/wifi/eduroam.conf
-</pre>
- <br />
- You're finished! Restart the network service with:<br />
- <pre># service networking restartworking restart</pre>
- And you can connect to a available network by running this command.<br />
- <pre># ifup [INTERFACE]</pre>
- If you want to force an [SSID] you can run:<br />
- <pre># ifup [INTERFACE]=[SSID]</pre></p>
-
- <h3>CONFIG CREATION</h3>
- <p>Standard wpa2 network configs can be created by running:<br />
- <pre># wpa_passphrase [SSID] [PASSWORD] > /etc/network/wifi/[SSID].conf</pre>
- <br />
- For eduroam you can use this example:<br />
-<pre>
-network={
- ssid="eduroam"
- key_mgmt=WPA-EAP
- eap=TTLS
- phase2="auth=MSCHAPV2"
- ca_cert="/etc/ssl/certs/AddTrust_External_Root.pem"
- identity="login@university.nl"
- scan_ssid=1
- password="YOURPASSWORD"
-}
-</pre>
- If you don't want your password in a config you can also use a hash generated by this command. (Don't forget to remove it from ~/.bash_history afterwards)<br />
-<pre>$ echo -n [PASSWORD] | iconv -t UTF16LE | openssl md4</pre>
- You should replace the plaintext string with: "hash:[HASHOUTPUT]"<br />
- note: don't use quotes.</p>
- <footer>update 2014-03-04: fixed a few small errors concerning hashing and config files</footer>
- </body>
-</html>
+++ /dev/null
-<html>
- <head>
- <title>Play youtube videos on a headless server</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- Download the get_flash_videos latest version:
-<pre>$ git clone https://github.com/monsieurvideo/get-flash-videos.git</pre>
- Install the dependencies:
-<pre># apt-get install perl libmodule-find-perl libwww-mechanize-perl vlc</pre>
- Install the get_flash_videos script:
-<pre>
-$ cd get-flash-videos/
-$ make
-$ make install
-</pre>
- Create a small script that combines these with vlc by adding this to bashrc or a shellscript in PATH the flag -A alsa could be different(when usig pulseaudio it can be omitted):
-<pre>
-function ytview {
- if [ "$#" -ne "1" ]; then
- echo "usage $0 yturl"
- else
- get_flash_videos -q -f - $1 | cvlc -A alsa -V aa -
- fi
-}
-</pre>
- Play a video by typing:
-<pre>$ ytview http://www.youtube.com/watch?v=QAUzWtLMnU0</pre>
- Some videos can't be downloaded, but most videos will just work.
- </body>
-</html>