Skip to content

Instantly share code, notes, and snippets.

@mnkhouri
mnkhouri / openPRs.py
Last active May 30, 2017 16:54
List open PRs
#!/usr/bin/env python
from getpass import getuser, getpass
from os.path import expanduser
from platform import node
from sys import exit
try:
import github3
except ImportError:
print('Module github3 not installed!')
print('Installation: pip install --pre github3.py')

Keybase proof

I hereby claim:

  • I am mnkhouri on github.
  • I am mkhouri (https://keybase.io/mkhouri) on keybase.
  • I have a public key ASCseC2ubs56Jyc6LWmUXK6K_nY-YwMyGe5HSpNC9Rayjgo

To claim this, I am signing this object:

@mnkhouri
mnkhouri / UpdateSystem.txt
Created September 20, 2016 14:09
Embedded interview questions
Update System
In any scripting language, write a script to update an embedded system.
Your embedded system's specifications are completely up to you. Please
write down any important details about it.
The script should accept two parameters:
- url to get the blob from
- md5 of the blob
@mnkhouri
mnkhouri / confirm.sh
Created August 8, 2016 14:40
shell confirmation/yes-no prompt
# From http://stackoverflow.com/a/3232082
confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case $response in
[yY][eE][sS]|[yY])
true;;
*)
false;;
esac
@mnkhouri
mnkhouri / raspbian-retropie.sh
Last active June 7, 2016 21:51
My Raspbian -> Retropie Setup
#!/usr/bin/env bash
# Fix locale settings
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo dpkg-reconfigure locales
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure keyboard-configuration
@mnkhouri
mnkhouri / iTerm.sh
Created October 29, 2015 20:01
Launch new iterm tab in CWD
#!/bin/bash
CD_CMD="cd "\\\"$(pwd)\\\"" && clear"
osascript &>/dev/null <<EOF
tell application "iTerm"
activate
if (count of windows) = 0 then
create window with default profile
else
@mnkhouri
mnkhouri / test.js
Created September 12, 2015 00:32
Node coercion to bool
#!/usr/bin/env node
var testZero = 0
if (testZero) {
console.log("int 0 evaluated TRUE")
}
else {
console.log("int 0 evaluated FALSE")
}