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
package main | |
import ( | |
"image" | |
_ "image/gif" | |
_ "image/jpeg" | |
_ "image/png" | |
"os" | |
"fmt" | |
) |
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
import os | |
import pickle | |
for d in os.walk("./"): | |
if len(d[2]) < 3: | |
continue | |
root = d[0] | |
conf = d[2][1] | |
f = open(root + "/" + conf) |
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
package togo | |
import ( | |
"bufio" | |
"encoding/gob" | |
"io" | |
"time" | |
) | |
type Task struct { |
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
package pass | |
import ( | |
"io" | |
"os" | |
"unicode" | |
) | |
type DB struct { | |
filename string |
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 | |
XINPUT_ENABLE_PROP=140 | |
DEV=$(xinput list | grep TouchPad | cut -d= -f2 | cut -f1 | xargs) | |
XINPUT_TOGGLE_CMD="xinput set-prop $DEV $XINPUT_ENABLE_PROP" | |
XINPUT_STATUS=$(xinput list-props $DEV | grep $XINPUT_ENABLE_PROP | cut -d: -f2) | |
if [ $XINPUT_STATUS -eq "1" ] | |
then | |
XINPUT_TOGGLE=0 |
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
for r in *; do cd $r; git pull origin master; cd ..; done |
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
#include <dlfcn.h> | |
#include <stdio.h> | |
int main() | |
{ | |
if (!dlopen("libdbdpgsql.so", RTLD_NOW)) { | |
printf("couldnt open!\n"); | |
} else { | |
printf("success!!!!!!\n"); | |
} |
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 beakpoint format to clipboard | |
func! CopyAsClip() | |
let s:pos=expand('%:p') . ':' . line('.') | |
call system("xclip", s:pos) | |
endfunc |
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 | |
# update pathogen .vim/bundle repositories | |
BACK=$(pwd) | |
update() { | |
cd $1 | |
if [ -d ".git" ]; then |
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 | |
# random words generator | |
dict="/usr/share/dict/american-english" | |
let word_c="$(wc -l $dict | awk '{print $1}')" | |
p=p | |
let oldseed=$(date +%N) |
OlderNewer