This file contains hidden or 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
| /* This function needs that the path arrays invoke the function | |
| * in order, else it will duplicate some nodes | |
| */ | |
| function populate(tree, path) { | |
| var node = {}; | |
| var label = path.shift(); | |
| var p_node = tree[tree.length - 1] || {}; | |
| if (!tree.length || p_node.label != label) { | |
| node.label = label; |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2012 R. Diaz de Leon <leon@elinter.net> | |
| * | |
| * comments.js | |
| * ver 5.0a | |
| * | |
| * Requires: | |
| * jQuery | |
| * | |
| * Use: |
This file contains hidden or 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
| /* comments.js | |
| * ver 3.0 | |
| * Requires jQuery | |
| * | |
| * Use: | |
| * comments.init( options ); | |
| * | |
| * Options: | |
| * selector: <jquery_selector> | |
| */ |
This file contains hidden or 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 <avr/io.h> | |
| #include <util/delay.h> | |
| void spi_init(void) | |
| { | |
| /* | |
| * PB0: RST | |
| * PB2: CS #1 | |
| * PB3: MOSI | |
| * PB4: MISO |
This file contains hidden or 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 *.flac; do | |
| avconv -y -i "${i}" -filter_complex 'channelsplit=channel_layout=2[FL][FR]' -map '[FL]' "instrumental/${i}" -map '[FR]' /tmp/tmp.flac | |
| done | |
This file contains hidden or 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 | |
| title="tomates" | |
| pomodoro=25m | |
| rest=5m | |
| for i in `seq 3`; do | |
| echo "Work Time" | |
| sleep $pomodoro | |
| notify-send $title "Take a short rest" |
This file contains hidden or 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 | |
| if [ $EUID -ne 0 ]; then | |
| echo "Run it as root, you silly goose!" | |
| exit 1 | |
| fi | |
| for dir in $(find / -name .git -type d); do | |
| cd $dir/.. | |
| git add * |
This file contains hidden or 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 <stdlib.h> | |
| #include "queue.h" | |
| static struct Node { | |
| void *value; | |
| struct Node *next; | |
| }; | |
| struct Queue { | |
| int size; |
This file contains hidden or 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 | |
| dev0=eth0 | |
| vpnconf="forticlient" | |
| nameserver="8.8.4.4" | |
| runfile="/var/run/vpnc.pid" | |
| if [ $(id -u) != "0" ] | |
| then | |
| echo "Must be run as root" >&2 |
This file contains hidden or 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
| execute pathogen#infect() | |
| syntax on | |
| set smartindent | |
| colorscheme monochrome | |
| autocmd FileType html setlocal smartindent expandtab shiftwidth=2 tabstop=2 | |
| autocmd FileType yaml setlocal smartindent expandtab shiftwidth=2 tabstop=2 | |
| autocmd FileType javascript setlocal smartindent expandtab shiftwidth=4 tabstop=4 |
OlderNewer