Skip to content

Instantly share code, notes, and snippets.

@Quebecisnice
Quebecisnice / manifest.json
Created April 7, 2011 23:44
Github for Google Chrome Browser
{
"name": "Github",
"description": "Github",
"version": "1.0",
"icons": {
"128": "128.png"
},
"app": {
"urls": [
"https://github.com/"
@Quebecisnice
Quebecisnice / about.md
Created August 9, 2011 15:52 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@Quebecisnice
Quebecisnice / hack.sh
Created April 2, 2012 14:08 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@Quebecisnice
Quebecisnice / User.rb
Created April 3, 2012 00:57
Rails OmniAuth snippet
def self.create_from_hash(registration_hash)
unless registration_hash || resigration_hash.empty?
return nil
end
provider = registration_hash[:provider]
info = registration_hash[:info]
user = User.new
@Quebecisnice
Quebecisnice / 24.cpp
Created April 9, 2012 17:57 — forked from fedelebron/24.cpp
24 solver, with no access to binary_function or function<...>, thanks to an outdated compiler. :) Still using C++11 though.
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#define forn(i, n) for(int i = 0; i < (n); ++i)
#define FUNC(i) (*(dispatch[funcs[i]]))
#define MFUNC(o) ([](double a, double b) { return a o b; })
using namespace std;
@Quebecisnice
Quebecisnice / Gemfile
Created September 13, 2012 18:43
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@Quebecisnice
Quebecisnice / _.md
Created August 2, 2013 01:11
INFO 247 - Lab 7 - #3 - Putting it together (full code)
@Quebecisnice
Quebecisnice / _.md
Created August 2, 2013 01:11
INFO 247 - Lab 7 - #3 - Putting it together (full code)
@Quebecisnice
Quebecisnice / heatmap1.py
Created August 27, 2013 20:58
Generating a simple heatmap w/ python
import numpy as np
from pandas import *
import matplotlib.pyplot as plt
Index = ['aaa', 'bbb', 'ccc', 'ddd', 'eee']
Cols = ['A', 'B', 'C', 'D']
df = DataFrame(abs(np.random.randn(5,4)), index=Index, columns = Cols)
plt.pcolor(df)
plt.yticks(np.arange(0.5, len(df.index), 1), df.index)