Skip to content

Instantly share code, notes, and snippets.

View joallard's full-sized avatar

Jonathan Allard joallard

View GitHub Profile
@joallard
joallard / pgfutter.rb
Created October 13, 2016 18:24
pgfutter brew formula
require "language/go"
class Pgfutter < Formula
desc "Import CSV and JSON into PostgreSQL the easy way"
homepage "https://github.com/lukasmartinelli/pgfutter"
url "https://github.com/lukasmartinelli/pgfutter.git", :tag => "v1.1"
sha256 ""
depends_on "go" => :build
@joallard
joallard / iterm-title-change.rb
Last active March 8, 2018 22:07
Shell ANSI escape sequences in Ruby (iTerm title, colors)
# <https://en.wikipedia.org/wiki/ANSI_escape_code>
# iTerm: Set title to 'foo'
puts "\e]0;Foo\a"
# equiv to
# puts "\033]0;Foo\007"
# Print 'foo' in green and reset
puts "\e[32;mfoo\e[0m boo"
@joallard
joallard / README.md
Last active August 29, 2015 14:08 — forked from mbostock/.block

This is not a true Demers cartogram; it lacks links between adjacent features. Instead of trying to preserve connectedness, this pseudo-cartogram tries to preserve locality, putting each square as close as possible to its origin without overlapping.

@joallard
joallard / keybase.md
Created October 24, 2014 19:22
Keybase Proof

Keybase proof

I hereby claim:

  • I am joallard on github.
  • I am joallard (https://keybase.io/joallard) on keybase.
  • I have a public key whose fingerprint is 795F 256C 46DA 3AB2 8E0F 99B6 7749 C3DF 2E21 EEC4

To claim this, I am signing this object:

@joallard
joallard / index.html
Created August 31, 2014 23:02
Bugzilla@Mozilla #1047500
<script>
if(window.bullocks){
console.log("woops!")
}
if(true){
console.log("yes")
}
</script>
@joallard
joallard / gist:8871673
Created February 7, 2014 20:55
Git detached working tree
sandyhill:dev-tmp jon$ mkdir bare.git && cd bare.git
sandyhill:bare.git jon$ git init --bare
Initialized empty Git repository in /Users/jon/dev-tmp/bare.git/
sandyhill:bare.git jon$ git config core.worktree ~/dev-tmp/bare-foo/
sandyhill:bare.git jon$ git config core.bare false
fatal: core.bare and core.worktree do not make sense
sandyhill:bare.git jon$ git --version
git version 1.8.5.1
sandyhill:bare.git jon$ git config core.worktree
fatal: core.bare and core.worktree do not make sense
@joallard
joallard / README.md
Created January 29, 2014 18:52
Résolution sur les droits dans l'ère numérique (Montréal, 2013)

Proposée par les Jeunes néodémocrates du Québec
Congrès de Montréal, 2013

ATTENDU que la protection des droits numériques est essentielle au développement d'une économie durable au 21e siècle;

IL EST RÉSOLU d'ajouter un alinéa 6.10, comme suit:

6.10 Droits dans l'ère numérique

@joallard
joallard / .url
Last active December 25, 2015 19:39
CanLII diff selector
javascript:(function(){var%20css=document.createElement('style');css.type='text/css';css.innerHTML='#webdiffContent>a>table:not(.highlightedTable){display:none;}';document.body.appendChild(css);})();
@joallard
joallard / 20130910-merge-commit.md
Last active September 27, 2022 21:19
So, you've merged yourself

So, you've merged the master branch with itself, and you ended up with a merge commit nobody wanted.

The problem

Let me tell you a little story...

John and Pete are working together on a repo.

$ git log --graph --pretty=oneline --abbrev-commit  # an alias I have under 'git lol', but 'gitk' does just fine
* 812492b (master, origin/master, origin/HEAD) Add stuff
@joallard
joallard / .gitconfig
Created August 28, 2013 16:07
Git aliases
[alias]
co = checkout
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
# Show short status with current branch name
st="!f() { br=$(git status | head -1) && echo "${br}" && git status -s; }; f"