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
var generatePassword=function(len, pool){ | |
len=(typeof(len)!='undefined'?len:32); | |
pool=(typeof(pool)!='undefined'?pool:'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_'); | |
for (var i=0, n=pool.length, pw=''; i<len; ++i){ | |
pw+=pool.charAt(Math.floor(Math.random()*n)); | |
} | |
return pw; | |
} |
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
#set autoindent | |
set brackets ""')>]}" | |
set matchbrackets "(<[{)>]}" | |
set nonewlines | |
set nowrap | |
set smooth | |
set tabsize 4 | |
include /usr/share/nano/css.nanorc | |
include /usr/share/nano/html.nanorc |
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 | |
for f in *.mp4; do | |
mv "$f" "$f".old; | |
avconv -i "$f".old -vf crop=490:576:115:0 -vcodec libx264 "$f"; | |
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
#!/bin/bash | |
for f in *.flv; do | |
avconv -i "$f" -c:a aac -strict -2 -b:a 128k -c:v libx264 -profile:v baseline ${f%%.flv}.mp4; | |
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
#!/bin/bash | |
e=1405195200;while [[ $(date +%Y) -ne $e ]];do figlet $(($e-$(date +%s)));sleep 1;clear;done;figlet $e |
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
<?php | |
function thumb_create($p_photo_file, $p_thumb_file, $p_max_size, $p_quality=60) | |
{ | |
$pic = @imagecreatefromjpeg($p_photo_file); | |
if ($pic) | |
{ | |
$thumb = @imagecreatetruecolor($p_max_size, $p_max_size) or die ("Can't create Image!"); | |
$width = imagesx($pic); |
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
/* http://www.quora.com/Web-Development/What-are-the-most-interesting-HTML-JS-DOM-CSS-hacks-that-most-web-developers-dont-know-about */ | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } | |
* * * * * * { background-color: rgba(255,255,0,.2); } |
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 | |
# before running this script, do: | |
# brew install imagemagick jpegoptim | |
mkdir output | |
for f in *.jpg; do | |
convert -resize '300x300^' -gravity center -crop 300x300+0+0 ./"$f" ./output/"$f" | |
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
04fbae81d870a955913f48dcc71a3a9d0c183e53ffa97b0469ef5d3834d3bc8a13779c8c6421af3670a8e93fc840489890933658fe1dcd06758bf92d5c52fae007; indiagator |
OlderNewer