Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mnkhouri on github.
  • I am mkhouri ( on keybase.
  • I have a public key ASCseC2ubs56Jyc6LWmUXK6K_nY-YwMyGe5HSpNC9Rayjgo

To claim this, I am signing this object:

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 /
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
import github3
except ImportError:
print('Module github3 not installed!')
print('Installation: pip install --pre')
mnkhouri /
Created August 8, 2016 14:40
shell confirmation/yes-no prompt
# From
confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case $response in
mnkhouri /
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 /
Created October 29, 2015 20:01
Launch new iterm tab in CWD
CD_CMD="cd "\\\"$(pwd)\\\"" && clear"
osascript &>/dev/null <<EOF
tell application "iTerm"
if (count of windows) = 0 then
create window with default profile
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")