Skip to content

Instantly share code, notes, and snippets.

@dstl1128
dstl1128 / gist:6ee63da579dfaade9311fd88c782b7d9
Last active January 14, 2019 13:48
Faking Python OS Module
import os
OSMOD = None
class MyObj(object):
def __init__(self, osmod):
global OSMOD
OSMOD = osmod
def __getattribute__(self, attr):
if attr == 'environ':
return { 'HOME' : '/home/derels' }
else:
@dstl1128
dstl1128 / bash-cheatsheet.sh
Created May 1, 2017 08:11 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04