Skip to content

Instantly share code, notes, and snippets.

View fl0w's full-sized avatar
🎉
50% hackin', 50% slackin'

Martin Iwanowski fl0w

🎉
50% hackin', 50% slackin'
  • Sweden, Stockholm
View GitHub Profile
@fl0w
fl0w / show-dot-files-mac.sh
Last active August 29, 2015 14:14
show dot files on mac yosemite
# in terminal
defaults write com.apple.finder AppleShowAllFiles YES
@fl0w
fl0w / uninstall-node.sh
Last active August 29, 2015 14:15
uninstall node from .dmg install @ mac os x
# props goes to http://stackoverflow.com/a/17203692
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
CREATE TABLE `blocks` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`begin_range` int(10) unsigned NOT NULL,
`end_range` int(10) unsigned NOT NULL,
`_location_id` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `begin_range` (`begin_range`,`end_range`)
) ENGINE=MyISAM AUTO_INCREMENT=2008839 DEFAULT CHARSET=ascii;
@fl0w
fl0w / keybase.md
Created September 6, 2015 16:57
keybase.md

Keybase proof

I hereby claim:

  • I am fl0w on github.
  • I am fl0w (https://keybase.io/fl0w) on keybase.
  • I have a public key whose fingerprint is C489 BC82 CEA3 E609 334C 0CEC BD7E 9C67 1B07 F16F

To claim this, I am signing this object:

rm -r ~/.atom
rm -r /usr/local/bin/atom
rm -r /usr/local/bin/apm
rm -r /Applications/Atom.app
rm -r ~/Library/Preferences/com.github.atom.plist
rm -r ~/Library/Application\ Support/com.github.atom.ShipIt
rm -r ~/Library/Application\ Support/Atom
rm -r ~/Library/Saved\ Application\ State/com.github.atom.savedState
rm -r ~/Library/Caches/com.github.atom
rm -r ~/Library/Caches/Atom
@fl0w
fl0w / purge-atom.sh
Last active December 18, 2015 10:21
# completely remove atom on mac os x
rm -r ~/.atom
rm -r /usr/local/bin/atom
rm -r /usr/local/bin/apm
rm -r /Applications/Atom.app
rm -r ~/Library/Preferences/com.github.atom.plist
rm -r ~/Library/Application\ Support/com.github.atom.ShipIt
rm -r ~/Library/Application\ Support/Atom
rm -r ~/Library/Saved\ Application\ State/com.github.atom.savedState
# completely remove atom on mac os x
rm -r ~/.atom
rm -r /usr/local/bin/atom
rm -r /usr/local/bin/apm
rm -r /Applications/Atom.app
rm -r ~/Library/Preferences/com.github.atom.plist
rm -r ~/Library/Application\ Support/com.github.atom.ShipIt
rm -r ~/Library/Application\ Support/Atom
rm -r ~/Library/Saved\ Application\ State/com.github.atom.savedState
'use strict'
let i = setInterval(() => {
console.log('x')
}, 0)
function run() {
console.log('.')
process.nextTick(run)
}
@fl0w
fl0w / index.js
Created June 6, 2016 22:36
global Promise monkey patch reminder
// for vanilla js
global.Promise = require('bluebird')
// for babel js
// put in your bootstrap
require('babel-runtime/core-js/promise').default = require('bluebird');
@fl0w
fl0w / bench-mixin.js
Last active March 21, 2017 13:58
trying to catch performance impact of mixins in node
'use strict'
const v8 = require('v8-natives')
// requires node v6+ as --allow-natives-syntax is changed
const Benchmark = require('benchmark')
const suite = new Benchmark.Suite()
const MixinOne = (Base) => class extends Base {}
const MixinTwo = (Base) => class extends Base {}