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 | |
dir="$HOME/capture" | |
output="$dir/output" | |
urls=`cat "$dir/list.txt"` | |
i=1 | |
for url in $urls; do | |
# Convert url to file name | |
path=`echo $url | sed -e 's/http:\/\/domain\.name\///g'` |
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 | |
# Make Internet connection fast again | |
sudo ipfw delete 1 | |
sudo ipfw delete 2 | |
sudo ipfw delete 3 | |
sudo ipfw delete 4 |
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 | |
function remove_gremlins($str) { | |
$cleaned = ''; | |
for ($i = 0, $max = strlen($str); $i < $max; $i++) { | |
$char_str = substr($str, $i, 1); | |
$char = ord($char_str); | |
if (($char >= 32) || ($char == 13)) { // new line or printable chars | |
$cleaned .= $char_str; | |
} |
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
gem 'sassc', '~> 1.7.1' | |
gem 'sassc-rails', '~> 1.1.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
#!/bin/bash | |
LENGTH=16 | |
if [ "$#" -gt 0 ]; then | |
LENGTH="$1" | |
fi | |
# from: https://gist.github.com/earthgecko/3089509 | |
RESULT=`cat /dev/urandom \ | |
| LC_CTYPE=C tr -dc 'a-zA-Z0-9-.?~!@#$%^&*' \ |
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
var Substring = function(s, e) { | |
this.s = s; | |
this.e = e; | |
this.l = e - s; | |
}; | |
var longestPalindromeFromOffset = function(s, i) { | |
var j, | |
long = new Substring(0, 1); | |
for (j = 1; (j <= (s.length - i)) && ((i - j) >= 0); j++) { |
OlderNewer