From: Mart Lubbers
- - Death/Doom metalOther Interests
- - Hacking
- - Kung fu
- - Linux
- - Pokémon
+
# apt-get install fuse encfs- Install a cloud service(copy.com used here)(assuming ~/bin is in your path and running on a 64bits machine)
PATH=$PATH:/home/test/bin- Download and install the copy client for linux -
-$ 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 --
Make sure your user is in the fuse group and setup the encfs share by doing this: -
-$ mkdir ~/.copy.encr ~/copy -$ encfs ~/.copy.encr ~/copy -- When they ask use option p for paranoia and pick a password.
$ CopyConsole -u=the_mail_you_signed_up_with -r=/home/your_linux_username/.copy.encr -p=the_password_you_signed_up_with- This creates a setup that does this automatically in the future
-if ! mountpoint -q ~/copy; then - encfs ~/.copy.encr ~/copy -fi -if ! pidof CopyConsole >> /dev/null; then - CopyConsole -daemon 2>&1 1>/dev/null -fi -- Congratulations your setup is working.
This could work with any cloud service, just mount the folder it wil sync first with encfs
- - diff --git a/put.bash b/put.bash index cd0b8fd..665e574 100644 --- a/put.bash +++ b/put.bash @@ -1,18 +1,19 @@ #!/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 diff --git a/wlan-debian.html b/wlan-debian.html deleted file mode 100644 index 8f35522..0000000 --- a/wlan-debian.html +++ /dev/null @@ -1,78 +0,0 @@ - - -Install wpa_supplicant and wireless-tools(standard in most distros).
-
# apt-get install wireless-tools wpa_supplicant-
$ iwconfig-
Create the SSID selection script.
- I've put mine in /etc/network/wifi/select
-
-#!/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 --
# chmod +x /etc/network/wifi/select-
-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 --
# service networking restartworking restart- And you can connect to a available network by running this command.
# ifup [INTERFACE]- If you want to force an [SSID] you can run:
# ifup [INTERFACE]=[SSID]- -
Standard wpa2 network configs can be created by running:
-
# wpa_passphrase [SSID] [PASSWORD] > /etc/network/wifi/[SSID].conf-
-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" -} -- 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)
$ echo -n [PASSWORD] | iconv -t UTF16LE | openssl md4- You should replace the plaintext string with: "hash:[HASHOUTPUT]"
$ git clone https://github.com/monsieurvideo/get-flash-videos.git- Install the dependencies: -
# apt-get install perl libmodule-find-perl libwww-mechanize-perl vlc- Install the get_flash_videos script: -
-$ cd get-flash-videos/ -$ make -$ make install -- 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): -
-function ytview { - if [ "$#" -ne "1" ]; then - echo "usage $0 yturl" - else - get_flash_videos -q -f - $1 | cvlc -A alsa -V aa - - fi -} -- Play a video by typing: -
$ ytview http://www.youtube.com/watch?v=QAUzWtLMnU0- Some videos can't be downloaded, but most videos will just work. - -