sudo ln -s /opt/X11 /usr/X11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fisk(); | |
throw new Error('fisk'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Easing } from 'react-native' | |
/* | |
* Function that animates a value from 0 - 1 | |
* Uses React Native’s Easing functions | |
* Returns an object that has a stop() function | |
*/ | |
interface Args { | |
duration: number, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
#content{height: 8000px; width: 800px; margin: 0 auto; background: yellow;position: relative;} | |
</style> | |
</head> | |
<body> | |
<div id="content"> | |
Lorem<br> | |
Lorem<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findKey = (haystack, needle) => { | |
let found = false | |
const iterate = (obj) => ( | |
Object.keys(obj).forEach((key) => { | |
if (found === false) { | |
if (key === needle) { | |
found = key | |
} else if (obj[key] && typeof obj[key] === 'object') { | |
iterate(obj[key]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keys = [37, 38, 39, 40] | |
var prevent = (e) => { | |
if ( e.type != 'keydown' || keys.indexOf(e.keyCode) != -1 ) { | |
e.preventDefault() | |
return false | |
} | |
} | |
var disableScroll = (node) => { | |
node = node || window | |
node.onwheel = node.ontouchmove = document.onkeydown = prevent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcode-select --install |
sudo mkdir -p /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat_tmp}/
vi /usr/local/Library/brew.rb
Change line 1 from:
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
to:
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
Save and exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example: | |
// var stateHandler = State(node, function(state) { this.className = state.active ? 'active' : '' }) | |
// stateHandler.set({ active: true }) | |
var states = {} | |
function State(elem, render) { | |
if ( states.hasOwnProperty(elem) ) | |
return states[elem] | |
if ( !(this instanceof State) ) { | |
var instance = new State(elem, render) |
NewerOlder