Skip to content

Instantly share code, notes, and snippets.

View jacomyal's full-sized avatar

Alexis Jacomy jacomyal

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 = [email protected]: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:

anonymous
anonymous / gist:4443628
Created January 3, 2013 13:56
A weird behaviour of JavaScript about variables with same name management.
// Weird thing:
// ************
//
// The following code does not throw any error, despite i is declared twice
// and I am using "use strict".
//
// So I was expecting the i in the inner for loop to be a different variable
// than the other i (and that it would override it in its own scope).
//
// But it does not: The log is:
@sheymann
sheymann / sigma.fruchterman.js
Created February 28, 2013 15:37
Fruchterman-Reingold layout plugin for Sigma.js with automatic cooling and stopping condition.
/**
* Linkurious 2012, all rights reserved.
* Sébastien Heymann <[email protected]>,
* Romain Yon <[email protected]>
*
* Please use http://jsbeautifier.org/ and indent with 2 spaces.
*
* Lib docs:
* http://twitter.github.com/bootstrap/
* http://docs.jquery.com/
@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active November 13, 2024 06:58
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip