Skip to content

Instantly share code, notes, and snippets.


Nadeem Bitar shinzui

  • Los Angeles / San Francisco
  • Twitter @shinzui
View GitHub Profile
#!/usr/bin/env python
# This is a trick, to output the bash commands we need to run in shell, and just execute this script inside an eval within our shell, so it imports what we need
# Possibly tie this in with for MFA support
# Will need to durably store MFA access tokens, possibly in some other env vars
# Could also store all different keys/info in different vars, to reuse as needed (lots of env vars though, file may be better)
import os
import sys
import getpass
View gist:c6e8cbfde661160fb46daad62bb7f2b0
if (
process.env.NODE_ENV === 'production' &&
) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {}
View service.hcl
* Required Variables.
variable "name" {}
variable "port" {}
variable "elb_security_group" {}
variable "elb_subnets" {}
shinzui /
Created Jan 21, 2016 — forked from eoinkelly/
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
shinzui / FP_Observables.js
Created Jan 19, 2016 — forked from yelouafi/FP_Observables.js
Observables with pure FP
View FP_Observables.js
// Observable is an Union Type, with the following variants
const Empty = () => ['EMPTY']
const Cons = (head, tail) => ['CONS', head, tail]
const Future = promise => ['FUTURE', promise]
// race between 2 promises; each promise will resolve to a lazy value
const lazyRace = (p1, p2) => Promise.race([p1,p2]).then(lazy => lazy())
// function composition
const compose = (...fns) => (arg) => fns.reduceRight((res, f) => f(res), arg)
shinzui /
Created Jan 14, 2016 — forked from Dr-Nikson/
Auth example (react + redux + react-router)
shinzui / fix_postgres.bash
Created Nov 13, 2015
Fixing psql autocomplete on OS X
View fix_postgres.bash
brew install readline
brew link --force readline
brew unlink postgresql
brew install postgreql
#should include readline
otool -L `which psql`
shinzui /
Last active Aug 29, 2015 — forked from HenrikJoreteg/
Minimalist routing in Redux

Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.

Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.

This also means that when doing server-side rendering of a redux app, you can just do:

var app = require('your/redux/app')
var React = require('react')
View gist:b191a1d4006c36353b73

Hi Zach :D

Modals are funny beasts, usually they are a design cop-out, but that's okay, designers have to make trade-offs too, give 'em a break.

First things first, I'm not sure there is such thing as a "simple" modal that is production ready. Certainly there have been times in my career I tossed out other people's "overly complex solutions" because I simply didn't understand the scope of the problem, and I have always loved it when people who have a branch of experience that I don't take the time


Keybase proof

I hereby claim:

  • I am shinzui on github.
  • I am shinzui ( on keybase.
  • I have a public key whose fingerprint is 02B1 5943 1DE8 7768 7E68 6AC6 F621 9CC5 A447 F453

To claim this, I am signing this object: