Skip to content

Instantly share code, notes, and snippets.

View volgar1x's full-sized avatar

Antoine Chauvin volgar1x

View GitHub Profile
;; Smartparens - Minor mode for Emacs that deals with parens pairs and tries to be smart about it
;; https://github.com/Fuco1/smartparens
;;
;; How to deal with do/end ->/end blocks in your Elixir files:
(eval-after-load 'smartparens
'(progn
(defun my-elixir-do-end-close-action (id action context)
(when (eq action 'insert)
@rob-brown
rob-brown / ElixirConf2014.md
Last active December 4, 2020 05:38
Notes from ElixirConf 2014

ElixirConf 2014

Dave Thomas—Opening Keynote

Twitter | Slides

Think different(ly)

Get out of your rut and learn new ways to think.

@ibussieres
ibussieres / upgrade_pg.sh
Last active May 26, 2021 04:29
Upgrade PostgreSQL 9.1 to 9.3 on Ubuntu 12.04
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'"
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
sudo su - postgres -c "service postgresql stop"
sudo su - postgres -c '/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"'

Kernel keywords

  • apply/2
  • apply/3
  • cond/1
  • destructure/2
  • exit/1
  • if/2
  • in/2
  • match?/2
@tternes
tternes / NSHomerString
Created November 25, 2013 18:05
NSHomerString
NSString *homer =
@"\n"
@" __ \n"
@" _ ,___,-'\",-=-. \n"
@" __,-- _ _,-'_)_ (\"\"`'-._\\ `. \n"
@" _,' __ |,' ,-' __) ,- /. | \n"
@" ,'_,--' | -' _)/ `\\ \n"
@" ,',' ,' ,-'_,` : \n"
@" ,' ,-' ,(,-( : \n"
@" ,' ,-' , _ ; \n"