Skip to content

Instantly share code, notes, and snippets.

View hussienliban's full-sized avatar

Hussien Liban hussienliban

View GitHub Profile
@hussienliban
hussienliban / Flexible Dockerized Phoenix Deployments.md
Created November 30, 2019 17:20 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@hussienliban
hussienliban / GLSL-Noise.md
Created July 25, 2019 13:23 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@hussienliban
hussienliban / tmux-cheatsheet.markdown
Created November 4, 2015 09:48 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hussienliban
hussienliban / An-Anonymous-Pen.markdown
Created January 2, 2014 10:14
A Pen by Anonasaurus Rex.
@hussienliban
hussienliban / gist:3718695
Created September 13, 2012 23:49
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@hussienliban
hussienliban / .htaccess
Created April 15, 2012 06:43 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
a{
text-decoration: none;
color: #d44444;
font: bold 45px/45px verdana;
text-align: center;
}
h1{-webkit-perspective: 800px;}
.cube {
display: block; position: relative; margin: 30px auto;
@hussienliban
hussienliban / dabblet.css
Created April 2, 2012 19:36
Table example
/**
* Table example
hsla(0,0%,98%,1)
hsla(0,0%,90%,1)
hsla(0,0%,70%,1)
hsla(0,0%,50%,1)
hsla(0,0%,30%,1)
hsla(0,0%,10%,1)
*/
@hussienliban
hussienliban / CSS ios delete animation
Created March 29, 2012 06:33
ios delete animation
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
body{
background:url("http://dabblet.com/img/noise.png") repeat scroll 0 0%, -moz-linear-gradient(left center , #ECE7E3 1px, transparent 1px) no-repeat scroll 2.8em 0 #F4F1EF;
}
.point{
display: inline-block;
background: #23A8EF;
width: 150px;
body{
background:url("http://dabblet.com/img/noise.png") repeat scroll 0 0%, -moz-linear-gradient(left center , #ECE7E3 1px, transparent 1px) no-repeat scroll 2.8em 0 #F4F1EF;
}
.point{
display: inline-block;
background: #23A8EF;
width: 150px;
height: 100px;
border-radius: 8px;