This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# resetRootPass script | |
# | |
# Recover lost root password of mysql database. | |
# | |
# By Willem Bermon | |
# | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------- vim-commands ---------------------------------------------------------- | |
// BASIC CONTROL | |
hjkl - move | |
i - insert mode | |
R - replace mode | |
o - insert new line below | |
O - insert new line above | |
// LINE MOTIONS | |
0 - start of line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sipRound : [4][64] -> [4][64]; | |
sipRound [v0 v1 v2 v3] = [v0_3 v1_4 v2_3 v3_4] | |
where { | |
v0_1 = v0 + v1; | |
v1_1 = v1 << 13; | |
v1_2 = v1_1 ^ v0_1; | |
v0_2 = v0_1 << 32; | |
v2_1 = v2 + v3; | |
v3_1 = v3 << 16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reddit.com | |
ycombinator.com | |
facebook.com | |
imgur.com | |
twitter.com | |
bbc.co.uk | |
channel4.com | |
youtube.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in `seq 1 10`; | |
do | |
wget -q "http://www.youtube.com/user/goingquantum/videos?page=$i" -O page.$i.txt | |
done | |
cat page.*.txt > total.txt | |
grep -o "/watch?v=\([^\"\&]*\)" total.txt | sed 's/\/watch?v=//g' | uniq > ids.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// could probably be much smaller given some work. | |
// compressed version | |
#include <stdio.h> | |
#define w while | |
#define b break | |
int i,j;char s='S',d[]="S0a0>S1a0>a0a0>a1a0>a-H--";struct t{t*l;t*r;char v;}; | |
int main(int c, char**v){t*h=0;w(v[1][j]){t*n=new t;n->v=v[1][j];n->l=h;n->r=0;if(h)h->r=n; | |
h=n;++j;}w(1){if(!h->l)b;h=h->l;}w(1){if(s=='H')b;i=0;w(d[i]){if(s==d[i]&&h->v==d[i+1]){ | |
s=d[i+2];h->v=d[i+3];t*m=new t;m->v='-';if(d[i+4]=='<'){if(!h->l){m->l=0;m->r=h;h->l=m;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.aero | |
.asia | |
.biz | |
.cat | |
.com | |
.coop | |
.info | |
.int | |
.jobs | |
.mobi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var generic = ['.aero', '.asia', '.biz', '.cat', '.com', '.coop', '.info', '.int', '.jobs', '.mobi', '.museum', '.name', '.net', '.org', '.pro', '.tel', '.travel', '.xxx']; | |
var us = ['.edu', '.gov', '.mil']; | |
var a = ['.ac', '.ad', '.ae', '.af', '.ag', '.ai', '.al', '.am', '.an', '.ao', '.aq', '.ar', '.as', '.at', '.au', '.aw', '.ax', '.az']; | |
var b = ['.ba', '.bb', '.bd', '.be', '.bf', '.bg', '.bh', '.bi', '.bj', '.bm', '.bn', '.bo', '.br', '.bs', '.bt', '.bv', '.bw', '.by', '.bz']; | |
var c = ['.ca', '.cc', '.cd', '.cf', '.cg', '.ch', '.ci', '.ck', '.cl', '.cm', '.cn', '.co', '.cr', '.cs', '.cu', '.cv', '.cx', '.cy', '.cz']; | |
var d = ['.dd', '.de', '.dj', '.dk', '.dm', '.do', '.dz']; | |
var e = ['.ec', '.ee', '.eg', '.eh', '.er', '.es', '.et', '.eu']; | |
var f = ['.fi', '.fj', '.fk', '.fm', '.fo', '.fr']; | |
var g = ['.ga', '.gb', '.gd', '.ge', '.gf', '.gg', '.gh', '.gi', '.gl', '.gm', '.gn', '.gp', '.gq', '.gr', '.gs', '.gt', '.gu', '.gw', '.gy']; | |
var h = ['.hk', '.hm', '.hn', '.hr', '.ht', '.hu']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-a | |
bind-key C-a last-window | |
# Reload key | |
bind r source-file ~/.tmux.conf | |
set -g history-limit 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- RULES -- | |
~ should be a single .c or .cpp file | |
~ must be written in C or C++ (C is a subset of C++) | |
~ entry must compile (of course) | |
~ must be a deterministic 1-tape TM as defined below | |
~ should accept the input string as a command-line argument (see Links for how to do this) | |
~ upon input, the program should output state:tape followed by a new line | |
~ the program should terminate once the state becomes H,Y, or N. | |
~ the delta function should be changeable (no hard coding the procedure!) | |
~ submissions should have a 'default' delta function that reverses the input string |