Skip to content

Instantly share code, notes, and snippets.

View gandro's full-sized avatar

Sebastian Wicki gandro

View GitHub Profile
@gandro
gandro / lixbiblio.py
Created November 25, 2014 23:18
Script to generate wiki page based on ISBN
import json, sys
from urllib.request import urlopen
API='http://xisbn.worldcat.org/webservices/xid/isbn/{isbn}?method=getMetadata&format=json&fl=*'
OPT_KEYS = ['author', 'city', 'ed', 'form', 'lang', 'lccn',
'originalLang', 'publisher', 'year']
def get_metadata(isbn):
rawjson = urlopen(API.format(isbn=isbn)).readall().decode('utf-8')
response = json.loads(rawjson)
#ifndef __fat32_ebpb_DEV_H
#define __fat32_ebpb_DEV_H 1
/*
* DEVICE DEFINITION: FAT32 Extended BIOS Parameter Block (EBPB)
*
* Copyright (c) 2010, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE
* file. If you do not find this file, copies can be found by
@gandro
gandro / rapidshare.sh
Created February 3, 2010 12:27
Rapidshare Free-User Download Shellscript
#!/bin/bash
# Version 4.1.0
#
# "THE COFFEE-WARE LICENSE" (Revision 12/2007):
#
# Sebastian Wicki <gandro@gmx.net> wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some
# day, and you think this stuff is worth it, you can buy me a cup of coffee
# in return.
#
#!/bin/bash
# Version 10.8.12
URL="http://www.youtube.com/get_video"$(wget -q -O - "$1" | echo -e "$(sed 's/+/ /g; s/%/\\x/g')" | grep 'var swfHTML' | \
sed -re 's/.*fmt_url_map=([0-9]+)\|.*&t=([^&]+)&.*&video_id=([A-Za-z0-9_-]+).*/?video_id=\3\&t=\2\&asv=\&fmt=\1/')
echo "$URL"
// Version 10.8.12
var URL=unescape(
document.getElementById("movie_player").getAttributeNode("flashvars").value).
replace(/.*fmt_url_map=([0-9]+)\|.*&t=([^&]+).*&video_id=([A-Za-z0-9_-]+).*/,
"http://www.youtube.com/get_video?video_id=$3&t=$2&asv=&fmt=$1");
alert(URL);
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/
#---------------------------------------------
# BACKGROUND AND BORDER
#!/bin/bash
function get_property() {
cat /sys/devices/platform/smapi/BAT0/$1
}
PREFIX="/usr/share/icons/gnome/24x24/status/"
while true ; do
PERCENT=$(get_property remaining_percent)
1 gandro@ThinkPad ..examples/hello (git)-[master] % rustc --target=x86_64-rumprun-netbsd hello.rs :(
error: linking with `x86_64-rumprun-netbsd-gcc` failed: exit code: 1
note: "x86_64-rumprun-netbsd-gcc" "-Wl,--as-needed" "-m64" "-L" "/home/gandro/Projekte/rust-rumprun/rumprun-packages/rust/build/destdir/lib/rustlib/x86_64-rumprun-netbsd/lib" "hello.0.o" "-o" "hello" "-Wl,--gc-sections" "/home/gandro/Projekte/rust-rumprun/rumprun-packages/rust/build/destdir/lib/rustlib/x86_64-rumprun-netbsd/lib/libstd-bb943c5a.rlib" "/home/gandro/Projekte/rust-rumprun/rumprun-packages/rust/build/destdir/lib/rustlib/x86_64-rumprun-netbsd/lib/libcollections-bb943c5a.rlib" "/home/gandro/Projekte/rust-rumprun/rumprun-packages/rust/build/destdir/lib/rustlib/x86_64-rumprun-netbsd/lib/librustc_unicode-bb943c5a.rlib" "/home/gandro/Projekte/rust-rumprun/rumprun-packages/rust/build/destdir/lib/rustlib/x86_64-rumprun-netbsd/lib/librand-bb943c5a.rlib
#!/bin/bash
set +o posix
BASEDIR="$(dirname "$(realpath "$0")")"
##############################################################################
# path to text file with line separted list of feed urls
FEED_FILE="${BASEDIR}/feeds.txt"
@gandro
gandro / keybase.md
Created March 30, 2016 19:36
Keybase Verification

Keybase proof

I hereby claim:

  • I am gandro on github.
  • I am gandro (https://keybase.io/gandro) on keybase.
  • I have a public key ASBBoeBKPqHZuf7WCDp1CpQeYc967JsyjhU_r3XHhZiNrQo

To claim this, I am signing this object: