Skip to content

Instantly share code, notes, and snippets.

View georgiee's full-sized avatar
👻
Ghosting github.com since a while

Georgios Kaleadis georgiee

👻
Ghosting github.com since a while
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@dfadler
dfadler / get-sprite.sass
Created July 13, 2012 15:05
A SASS mixin for generating a sprite declaration block that will work with media queries
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true)
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position
@alvinlai
alvinlai / .gitignore
Created July 1, 2012 04:56 — forked from mybuddymichael/.gitignore
Starter Stasis project
/.sass-cache
/public
@tancnle
tancnle / gist:2969692
Created June 22, 2012 01:32
Fix incorrect Nokogiri loaded libraries

Every time I upgrade libxml2 via Homebrew, running cucumber test will post an annoying warning message

WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.8.0

To fix it:

$ gem uninstall nokogiri
$ brew link libxml2

$ gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26

@mxriverlynn
mxriverlynn / 1.html
Created April 11, 2012 14:37
modal dialog with backbone
<script id="modal-view-template" type="text/html">
<div class="modal-header">
<h2>This is a modal!</h2>
</div>
<div class="modal-body">
<p>With some content in it!</p>
</div>
<div class="modal-footer">
<button class="btn">cancel</button>
<button class="btn-default">Ok</button>
@mirisuzanne
mirisuzanne / 1_index.html
Created April 4, 2012 22:58
Suggested syntax for responsive Susy layouts
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<link rel="stylesheet" href="stylesheets/screen.css">
</head>
<body>
<div class="container c1"></div>
<div class="container c2"></div>
@anthonyshort
anthonyshort / _media-queries.scss
Created March 13, 2012 10:37
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@abhishekdev
abhishekdev / com.edb.launchd.postgresql-9.1.plist
Created March 2, 2012 19:56
Disable/Enable PostgreSQL Autostart on Mac OS X Lion
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.edb.launchd.postgresql-9.1</string>
<key>ProgramArguments</key>
@skagedal
skagedal / underscore-pickrandom.js
Created January 31, 2012 11:22
pickRandom mixin for underscore
// underscore-pickrandom.js
// (c) 2012 Simon Kågedal Reimer
// This file is freely distributable under the MIT license.
// _.pickRandom - a mixin for underscore.js.
//
// Pick random elements from an array. Works similar to
// `_.first(_.shuffle(array, n))`, but is more efficient -- operates
// in time proportional to `n` rather than the length of the whole
// array.