Skip to content

Instantly share code, notes, and snippets.

View 001101's full-sized avatar

PCM 001101

View GitHub Profile
@001101
001101 / gist:23c564611e12bd0d03578bf025a8d492
Created February 18, 2017 09:07 — forked from carld/gist:87f2453ed622f92f220451b7e8ae6a26
go through all directories, test for .git/ and diff stat two branches
for dir in `find . -type d -depth 1`; do
cd $dir;
if [ -d .git ]; then
if git branch -ra | grep -q "$B2\$"; then
echo $dir;
git diff --shortstat $B1 $B2;
fi
fi
cd ..;
done
@001101
001101 / gist:11d1e3459a1956e4df1e0e1f443e98bc
Created December 7, 2016 14:29 — forked from jdevalk/gist:5623050
Redirect script sample NGINX code. Make sure this location line sits above the "location /" code in your NGINX config.
location /redirect/ {
rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last;
}
@001101
001101 / .htaccess
Created December 7, 2016 14:29 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@001101
001101 / font-stacks.css
Created November 10, 2015 03:03 — forked from ct27stf/font-stacks.css
Similar looking fonts for Windows, Linux, Mac
.mono-font-stack {
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}
.times-font-stack {
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
}
.modern-font-stack {
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;