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) |
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
typedef char* itch_msg; // message content only | |
typedef void (*itch_handler)(itch_msg); // message handler func type | |
typedef itch_handler itch_map[122]; // map of message name and func ptr | |
// emit looks up the data in itch_map and calls appropriate function | |
void itch_emit(itch_map* m, char* data); | |
// Handlers | |
#define MSG_SYSTEM_EVENT 'S' |
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
local array = {1,2,0,0,3,1,2} | |
function swap(a, b, table) | |
if table[a] == nil or table[b] == nil then | |
return false | |
end | |
if table[a] > table[b] then | |
table[a], table[b] = table[b], table[a] |
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 | |
// our first concern is to keep a good state of all the objects in the ui | |
// to do it quickly we need to control how objects are inserted, moved, and resized | |
type Monitor struct { | |
size_x int | |
size_y int | |
widgets []Widget | |
} |
OlderNewer