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
| #ruby | |
| require "rubygems" | |
| require "net/http" | |
| require 'nokogiri' | |
| #API | |
| PARAMS = %w(title website description) | |
| API_KEY = "YOUR KEY" | |
| LOCATION = "moscow" |
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
| function getCaret(node) { | |
| if (node.selectionStart) { | |
| return node.selectionStart; | |
| } else if (!document.selection) { | |
| return 0; | |
| } | |
| var c = "\001", | |
| sel = document.selection.createRange(), | |
| dul = sel.duplicate(), | |
| len = 0; |
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
| { | |
| "cmd": ["if [ \"$file_extension\" = \"sass\" ]; then sass --watch $file_name:../${file_base_name}.css --style compressed; elif [ \"$file_extension\" = \"slim\" ]; then slimrb -p $file_name ../$file_base_name.html; fi"], | |
| "selector": "source.slim,source.sass", | |
| "working_dir": "$file_path", | |
| "path": "/usr/local/bin:$PATH", | |
| "shell": true | |
| } |
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
| { | |
| "cmd": ["coffee", "--compile", "--output", "../", "$file_name"], | |
| "path": "/usr/local/bin:$PATH", | |
| "selector": "source.coffee", | |
| "working_dir": "$file_path" | |
| } |
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
| <?php | |
| // Run with shell as `php -a scanimages.php` | |
| // If you want to check your actual place, use `pwd` | |
| define(PATH, "/Users/rozzy/Source/Web/mypath/"); | |
| $all_files = scandir(PATH); | |
| $may_content = $matches = $end_f = array(); | |
| foreach ($all_files as $value) { | |
| $exclude = array( | |
| '.', | |
| '..', |
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
| <? | |
| function getFeed($feed_url) { | |
| $content = file_get_contents($feed_url); | |
| $x = new SimpleXmlElement($content); | |
| $feed = array(); | |
| $str = ""; | |
| foreach($x->channel->item as $entry) { | |
| if (count($feed) < 5) { | |
| $f = "<li><a href='$entry->link' title='$entry->title'>$entry->title</a></li>"; |
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
| function mkd () { | |
| mkdir -p "$@" && cd "$@" | |
| } | |
| function slow_internet() { | |
| sudo ipfw pipe 1 config bw 128Kbit/s delay 200ms && sudo ipfw add 1 pipe 1 src-port 80 | |
| } | |
| function get_file_size () { | |
| ls -lah $@ | awk '{ print $5}' |
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
| alias god=whoami | |
| alias cjpeg="sh ~/cjpeg" | |
| alias lsd="ls -d -- */" | |
| alias subl=sublime | |
| alias deepthroat="cd ~/../../../.." |
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
| set mousemodel=extend | |
| set ai | |
| set ruler | |
| filetype plugin on | |
| set number | |
| syntax on | |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set expandtab |
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
| source ~/.ssh_aliases | |
| source ~/.bash_profile | |
| source ~/.functions | |
| source ~/.aliases |
OlderNewer