Skip to content

Instantly share code, notes, and snippets.

Michael Yoffe myoffe

Block or report user

Report or block myoffe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
myoffe /
Last active May 30, 2018
Getting started with Node/React... and why you shouldn't

Getting started with Node... and why you shouldn't.

This is originally an email that I wrote to a developer friend of mind, in response for his request for my experiences and advice regarding working with Node for a few months.

I wrote it at a time that I should have been sleeping, but I couldn't, because I was too excited/nervous for my upcoming A1 driving test.

Who am I?

I'm a software developer with 10 years of experience of shipping stuff in Java, Python, C++, Objective-C and now Node.

Node and Java (and Kotlin)

View internal_iframe_event_receive.html
<!DOCTYPE html>
<script src=""></script>
alert('Close button is clicked or click is triggered');
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
myoffe / .gitconfig
Last active Dec 20, 2015
Send OSX notifications during the day to remind you how much your branch is lagging behind master. WIP: doesn't work. Trying to migrate to launchd plist
View .gitconfig
curbranch = rev-parse --abbrev-ref HEAD
offset = !git log $(git curbranch)..master
myoffe / useful_yad2.js
Created Jun 28, 2013
Slightly modified version of Useful Yad2 ( to work with all Nadlan pages.
View useful_yad2.js
// ==UserScript==
// @name A Bit More Useful Yad2
// @match*.php*
// @version 0.3
// ==/UserScript==
* Slightly modified version of Useful Yad2 []
* to work with all Nadlan pages.
myoffe /
Created Mar 11, 2011
Normalize whitespace in string
def normalize_whitespace(str):
import re
str = str.strip()
str = re.sub(r'\s+', ' ', str)
return str
myoffe /
Created Mar 11, 2011
Split Django
# 1. Create a models folder under myApp.
# 2. Delete and add a file in the models folder for each model model_name.
# 3. Add the following to each model file :
class Meta:
app_label = 'myApp'
# 4. Add a line in models/_init__.py_ for each model file :
You can’t perform that action at this time.