Skip to content

Instantly share code, notes, and snippets.

jfreeze / tailwindsetup.txt
Last active Sep 9, 2020
TailwindCSS Setup
View tailwindsetup.txt
mix app_name
cd app_name
cd assets
npm install tailwindcss @tailwindcss/ui postcss-import postcss-loader --save-dev
npx tailwindcss init
npx tailwind init tailwindcss-full.js --full
# Change the app dir to your app dir!
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
sudo dpkg -i erlang-solutions_1.0_all.deb
View gist:42420f0248cfd49daa23
(defun tester (&rest cl-keys)
(cl--parsing-keywords ((:function nil) (:match nil)) nil
(if (and buffer-file-name (string-match cl-match buffer-file-name))
(setq tester--test-run-function cl-function)
(setq tester--test-run-function nil))))
(defun tester--store-setup ()
(setq tester--last-test-file buffer-file-name)
(setq tester--last-test-function tester--test-run-function))
eoinkelly /
Last active Nov 9, 2017
Upgrade Postgres to 9.4 using Homebrew on Mac OSX
# This script can be used in "run & hope" mode or you can use it as a recipe to
# do things manually - you probably want the latter if you really care about
# the data in your databases.
# Happy hacking
# /Eoin/
# Tell bash to stop if something goes wrong
set -e
chrismccord / gist:e774e6ab5220e6505a03
Last active Aug 29, 2015
Upgrading your Phoenix 0.5.x application to 0.6.0
View gist:e774e6ab5220e6505a03

Upgrading Phoenix 0.5.x to 0.6.0

If you're still on 0.4.x, follow [this 0.4x to 0.5.0 upgrade guide] (, then head back over here.

Phoenix 0.6.0 brings some nice enhancements and a few backwards incompatible changes. The following steps should get your 0.5.x apps up and running on the latest and greatest.


The Router no longer defines the default :browser and :api pipelines for you, but they remain the idiomatic defaults. You can copy the standard pipelines into your router:

View gist:a06de248d773ea580ec7
upstream app {
server fail_timeout=5s;
server {
listen 80 default_server;
server_name _;
root '/var/app/current/priv/static';
dgoldie /
Created Aug 6, 2014
Upgrade to Phoenix 4

README - upgrade to phoenix 4.

This conversion was actually done with phoenix master, the week before phoenix 4 released.


  • Erlang 17.0
  • Elixir 0.15.0
  • Phoenix master, "55577a267a1635af3d19fb5c37381077bd25e484"


cromwellryan / Guardfile
Last active Dec 19, 2015
Guardfile for elixirc
View Guardfile
guard 'shell', :elixirc_bin => "/usr/local/elixirc" do
watch(/(.+\.ex$)/) { |m| `elixirc #{m[0]}` }
guard 'shell', :elixir_bin => "/usr/local/elixir" do
watch(/(.+\.exs$)/) { |m| `elixir #{m[0]}` }
qrush / gist:5301799
Created Apr 3, 2013
spring clean your git repos!
View gist:5301799
# remove any bad refs
git remote prune origin
# pipe into bash and auto-delete any branches that have been merged into master!
git log master --pretty=format:'%d' | grep '^ (origin' | tr -d ' ()' | sed 's/origin\//git push origin :/'
myobie / mountain-lion-brew-setup.markdown
Created Feb 18, 2012
Get Mountain Lion and Homebrew to Be Happy
View mountain-lion-brew-setup.markdown

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.