brew install fortune cowsay coreutils
Make sure you have rvm
[Install] and then put this line to the bottom of your shell (.bashrc
or .zshrc
):
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This load rvm
/* | |
Take and modify from https://gist.github.com/trusktr/1e5e516df4e8032cbc3d | |
~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... |
{"version":1,"keyboard":{"keys":[{"id":0,"legend":"~\n`","state":{"x":0,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":0,"keycodes":[{"id":"KC_GESC","fields":[]},{"id":"KC_APP","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"!\n1","state":{"x":1,"y":0,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0},"row":0,"col":1,"keycodes":[{"id":"KC_1","fields":[]},{"id":"KC_F1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{" |
/* eslint-disable */ | |
import React from 'react' | |
import {View, Animated, PanResponder} from 'react-native' | |
const styles = { | |
container: { | |
backgroundColor: '#FFFFFF', | |
justifyContent: 'center', | |
alignItems: 'center', | |
flex: 1 |
String.prototype.toSlug = function(){ | |
st = this.toLowerCase(); | |
st = st.replace(/[\u00C0-\u00C5]/ig,'a') | |
st = st.replace(/[\u00C8-\u00CB]/ig,'e') | |
st = st.replace(/[\u00CC-\u00CF]/ig,'i') | |
st = st.replace(/[\u00D2-\u00D6]/ig,'o') | |
st = st.replace(/[\u00D9-\u00DC]/ig,'u') | |
st = st.replace(/[\u00D1]/ig,'n') | |
st = st.replace(/[^a-z0-9 ]+/gi,'') | |
st = st.trim().replace(/ /g,'-'); |
// Asume that your card has ID | |
const card = { | |
id: 'foo', | |
category: 'bar' | |
// ... | |
} | |
// This is how your app state looks like | |
const appState = { | |
entities: { |
brew install fortune cowsay coreutils
Make sure you have rvm
[Install] and then put this line to the bottom of your shell (.bashrc
or .zshrc
):
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This load rvm
const splitChars = /\b(billion|million|thoudsand|hundred)s?/g | |
const points = { | |
billion: 1000000000, | |
million: 1000000, | |
thoudsand: 1000, | |
hundred: 100 | |
} | |
const digits = { |
function compressString(str) { | |
const arrayOfChars = str.split('') | |
let currentChar = arrayOfChars[0] | |
let timeOfAppear = 1 | |
const mapOfChars = arrayOfChars.slice(1).reduce((result, value, index) => { | |
if (value === currentChar) { | |
timeOfAppear++ | |
return result |
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
function h(s, f, t, e, c, r, m, l, p) { | |
t = ''; | |
p = []; | |
e = function(t) { | |
return (t.replace(/[<&]/g, function(c) { | |
return '&#' + c.charCodeAt() + ';' | |
})) | |
}; | |
c = function(_) { | |
return (_ = s.replace(/^(\s*)(\/(\/.*|\*([^]*?\*\/|[^]*)))/, function(_, w, m) { |