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
youremail | |
yourpassword |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> |
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
#target Illustrator | |
// script.name = exportLayersAsCSS_PNGs.jsx; | |
// script.description = mimics the Save for Web; | |
// script.requirements = an open document; tested with CS5 on Windows. | |
// script.parent = carlos canto // 05/24/13; All rights reserved | |
// script.elegant = false; | |
// Source: http://graphicdesign.stackexchange.com/questions/20459/how-to-export-illustrator-layers-as-individual-images |
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
mysql -B -u username -p password database -h dbhost -e "SELECT * FROM accounts;" \ | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" |
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
function tarcrypt { | |
file=$1 | |
filename="$file.tar.gz.enc" | |
if [ -f $file ]; then | |
echo "-> $filename" | |
tar cz $file | openssl enc -aes-256-cbc -e > $filename | |
elif [ -d $file ]; then | |
echo "-> directory $filename" | |
# display progress | |
# linux: tar cf - $file -P | pv -s $(du -sb $file | awk '{print $1}') | gzip > big-files.tar.gz |
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 Macs: | |
# brew install tesseract --with-all-languages | |
echo "Hint: Prepare all png images as valid OCR input before starting convert process" | |
if [[ "$1" != "" ]]; then | |
files="$1" | |
else |
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 | |
# source: http://superuser.com/a/162628/398757 | |
function tarcrypt { | |
file=$1 | |
filename="$file.tar.gz.enc" | |
if [ -f $file ]; then | |
echo "-> $filename" | |
tar cz $file | openssl enc -aes-256-cbc -e > $filename | |
fi |
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 | |
$pass = 'yourpassword'; | |
$user = 'yourusername'; | |
// which config file to update | |
$nginxFile = '/etc/nginx/sites-enabled/mydyndns.domain.com'; | |
$authUser = (isset($_SERVER['PHP_AUTH_USER'])) ? $_SERVER['PHP_AUTH_USER'] : null; | |
$authPass = (isset($_SERVER['PHP_AUTH_PW'])) ? $_SERVER['PHP_AUTH_PW'] : null; |
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 | |
# output chrome console on your MAC terminal | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging --v=1 & | |
sleep 5 | |
tail -f "$HOME/Library/Application Support/Google/Chrome/chrome_debug.log" | egrep "(INFO|ERROR)\\:CONSOLE" |
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
#!/usr/bin/env coffee | |
process.stdin.on 'data', (s) -> | |
line = s.toString().replace(/\n/g, '_newline_') | |
replaceRuleset = [ | |
# remove tables | |
[ /\\begin\{(table)\}.*?\\end\{(table)\}/ig, '' ] | |
# remove tables | |
[ /\\begin\{(tabular)\}.*?\\end\{(tabular)\}/ig, '' ] |