#HOWTO deciphered from http://lol.pman.biz/archives/1052
- delete old partitions
- create new exteneded and then logical partition (2, 5)
- reboot
- use resize2fs on
/dev/mmcblk0p5
your newly resized, and remade, partition
fdisk /dev/mmcblk0
#!/bin/bash | |
#set url and port to the xbmc box webservice | |
XBMC_HOST="http://openelec:80" | |
if [ "$1" = "" ]; then | |
echo -n "Insert URL: " | |
read url | |
else | |
url="$1" | |
fi |
#!/bin/sh | |
CHROME_CACHE=$HOME/Library/Caches/Google/Chrome/Default/Cache | |
TMP_DIR=$HOME/Downloads/tmp | |
mkdir -p $TMP_DIR | |
for i in $(file $CHROME_CACHE/* | egrep -i 'jp|gif|png' |awk '{print $1}' | sed 's/://g'); do cp -v $i $TMP_DIR/`basename $i`.$(file $i | awk '{print tolower($2)}') ; done |
#generate(grab) 40 different sized placekittenimages | |
for i in {1..40}; do link="http://placekitten.com/g/`expr $i + 500`/`expr $i + 500`"; echo getting $link ; curl -o out.jpg $link ; done |
# ./manage.py shell | |
from museum.models import Keyword | |
keys = file('keywords.txt', 'r').readlines() | |
for key in keys: | |
k = Keyword(keyword=key.strip()) | |
k.save() | |
print '%s saved as %s' % (key.strip(), k.id) |
#HOWTO deciphered from http://lol.pman.biz/archives/1052
/dev/mmcblk0p5
your newly resized, and remade, partitionfdisk /dev/mmcblk0
sudo dd if=archlinux-hf-2013-07-22.img bs=1m | pv | sudo dd bs=1m of=/dev/rdisk2 | |
gist somefile.txt | xargs open |
def gen(asset): | |
# keywords = [] | |
# for keyword in asset.all(): | |
# keywords.append(str(keyword)) | |
# return u'%s' % (", ".join(keywords)) | |
# everything above replaced with below | |
return u'%s' % ", ".join([str(a) for a in asset.all()]) |
$.fn.classList = function() {return .attr('class').split(/\s+/);}; |
access_log /var/log/nginx/couchdb.access.log; | |
error_log /var/log/nginx/couchdb.error.log; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://127.0.0.1:5984/; |