Skip to content

Instantly share code, notes, and snippets.

View gliesche's full-sized avatar
🏠
Working from home

Felix Gliesche gliesche

🏠
Working from home
View GitHub Profile
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl http://npmjs.org/install.sh | sh
@gliesche
gliesche / facebook-sdk-jade
Created April 30, 2012 11:00
Facebook Javascript SDK loading for Jade templates
div(id="fb-root")
script
window.fbAsyncInit = function() {
FB.init({
appId :'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookies : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
@gliesche
gliesche / layout2.jade
Created July 3, 2012 15:37 — forked from kmiyashiro/layout2.jade
HTML5 Boilerplate Conditional comments in Jade
!!! 5
//if lt IE 7
html(class="no-js ie6 oldie", lang="en")
//if IE 7
html(class="no-js ie7 oldie", lang="en")
//if IE 8
html(class="no-js ie8 oldie", lang="en")
// [if gt IE 8] <!
html(class="no-js", lang="en")
// <![endif]
@gliesche
gliesche / gist:4176354
Created November 30, 2012 15:18 — forked from davatron5000/gist:2254924
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@gliesche
gliesche / facebook-dns-prefetch
Created January 22, 2013 15:43
DNS Prefetch for Facebook Like Plugin
<link rel="dns-prefetch" href="//www.facebook.com">
<link rel="dns-prefetch" href="//connect.facebook.net">
<link rel="dns-prefetch" href="//static.ak.facebook.com">
<link rel="dns-prefetch" href="//static.ak.fbcdn.net">
<link rel="dns-prefetch" href="//s-static.ak.facebook.com">
@gliesche
gliesche / git-overwrite-local-files
Created March 5, 2013 11:39
Force an overwrite of local files on a git pull
git fetch --all
git reset --hard origin/master
@gliesche
gliesche / gist:5204384
Created March 20, 2013 12:49
Natural box layout model
/* see here: http://paulirish.com/2012/box-sizing-border-box-ftw/ */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
@gliesche
gliesche / gist:8300771
Created January 7, 2014 15:15
Resize all images in folder and save copy with suffix "_low"
for i in *; do convert $i -resize 1024x `basename "$i" .jpg`_low.jpg; done
@gliesche
gliesche / gist:4c1df8cbd11d7eecf4d4
Created January 12, 2015 11:38
Output top level directory size only
du -h --max-depth=1
{
"name": "projectname",
"dependencies": {
},
"devDependencies": {}
}