Skip to content

Instantly share code, notes, and snippets.

@makefu
makefu / tinc
Last active April 17, 2019 11:25
tinc install
#!/bin/sh
main(){
#get sudo
if test "${nosudo-false}" != true -a `id -u` != 0; then
echo "we're going sudo..." >&2
exec sudo -E "$0" "$@"
exit 23 # go to hell
fi
set -euf
@makefu
makefu / clbin
Last active August 29, 2015 14:04 — forked from GermainZ/clbin
updated clbin, supports images through pipe and images without extension
#!/usr/bin/env bash
# Upload text/images to clbin.com from the command line
# License: ISC http://www.isc.org/downloads/software-support-policy/isc-license/
clip() {
if command -v xclip &> /dev/null; then
xclip -selection clip <<< "$@"
elif command -v xsel &> /dev/null; then
xsel -b -i <<< "$@"
fi
}

Keybase proof

I hereby claim:

  • I am makefu on github.
  • I am makefu (https://keybase.io/makefu) on keybase.
  • I have a public key whose fingerprint is 25B2 E3A9 0360 7EA3 556D 1F2A 2F6D 72BE B681 E7D5

To claim this, I am signing this object:

@makefu
makefu / faker
Last active August 29, 2015 13:56
python faker with Environment LANG Support
#!/usr/bin/python
from faker import Faker, AVAILABLE_LOCALES, DEFAULT_LOCALE
import os,sys
locale = os.environ['LANG'].split('.')[0]
if not(locale in AVAILABLE_LOCALES):
locale = DEFAULT_LOCALE
fake = Faker(locale=locale)
try:
f = sys.argv[1]
@makefu
makefu / gist:9091229
Created February 19, 2014 12:43
capo calculator
#!/usr/bin/python3
import csv
import urllib
def calc_credit(row,head,ledger):
payed= -1
for i,c in enumerate(row):
#print (i,c)
if c == 'o':
print ("%s payed" % head[i] )
@makefu
makefu / gist:7893430
Created December 10, 2013 16:25
unescaping version of google dictionary api in python stolen from http://gulzarmanzil.wordpress.com/2012/09/22/google-dictionary-api/
from urllib2 import urlopen
import sys
import HTMLParser
h = HTMLParser.HTMLParser()
keyword = sys.argv[1]
null = None
data = urlopen("http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q="+keyword+"&sl=en&tl=en&restrict=pr%2Cde&client=te").read()[25:-1]
d = eval('('+data+')')
@makefu
makefu / gist:6239794
Created August 15, 2013 10:10
Bridge Mode for wr703
## /etc/config/wireless
config wifi-device radio0
option disabled 0
option type mac80211
option channel 11
option macaddr ec:17:2f:dd:28:ae
option hwmode 11ng
option htmode HT20
list ht_capab SHORT-GI-20
@makefu
makefu / logfile
Last active December 20, 2015 20:09
2013-07-01 Binergewitter
2013-08-01 09:47:06 <-- theDOC (52522093@gateway/web/freenode/ip.82.82.32.147) has left #binaergewitter
2013-08-01 15:27:30 -- Mode #binaergewitter [+o savar] by ChanServ
2013-08-01 19:58:45 makefu hallo, internet
2013-08-01 20:00:16 makefu zeit
2013-08-01 20:00:38 lAdidAdi haiiiii
2013-08-01 20:00:45 Tok-A-Mak Tagwohl
2013-08-01 20:09:01 vabene1111 ja ich höre euch :D
2013-08-01 20:09:10 kaetzchen jap
2013-08-01 20:09:14 lAdidAdi shaguar
2013-08-01 20:09:22 Tok-A-Mak Status: perfekt
@makefu
makefu / gist:5368517
Last active December 16, 2015 03:18
marvel #free promo comic link clicker
var comics = document.getElementsByClassName("addComicLink");
for (var i = 0; i < comics.length; i+=1) {
ev = document.createEvent("MouseEvent");
ev.initMouseEvent("click",true,false,window,0,0,0,0,0,false,false,false,false,2,null);
if (comics[i].href.match( /buy/ ) ){
comics[i].dispatchEvent(ev);};
}
Is HTML a programming language?
It appears that many of you are cock sure about what you think a
programming language is. Some of you are so certain about it that you are
even willing to call others stupid merely for asking this question. Well
perhaps I can help deflate some of that arrogance. I have to commend the
people who are asking this question about HTML, because you have good
reason to. There is a more fundamental question here which clearly confuses
many folks including even students of computer science; and that is "What
is a programming language?" If you think that this is a simple question to