I hereby claim:
- I am kanekotic on github.
- I am kanekotic (https://keybase.io/kanekotic) on keybase.
- I have a public key ASCKcMfOurKMXOowUF3FfO2ZKnRlPgSOZUp0ZLBCwUhD6go
To claim this, I am signing this object:
{ | |
"toggles": [ | |
{ | |
"name": "prop", | |
"type": "release", | |
"value": false | |
}, | |
{ | |
"name": "prop2", | |
"type": "release", |
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
I hereby claim:
To claim this, I am signing this object:
body { background: #222; color: #e6e6e6; } | |
a { color: #949494; } | |
a:link, a:visited { color: #949494; } | |
a:hover, a:active, a:focus { color: #c7c7c7; } | |
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; } |
var startingAt = new Date() | |
var intervalInHours = 1 | |
var WatchLaterPlaylist = 'WL' | |
var SnippetString = 'snippet' | |
var DetailsString = 'contentDetails' | |
function AddIfNewToPlaylist(item){ | |
var anHourAgo = new Date().setHours(startingAt.getHours() - intervalInHours) | |
var videoDate = new Date().setTime(Date.parse(item.snippet.publishedAt)) | |
if(anHourAgo > videoDate) |
#app{ | |
margin-top: 70px; | |
} |
#Check and install Brew | |
which -s brew | |
if [[ $? != 0 ]] ; then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
#Check and install gcc | |
brew install gcc6 |
#Check and install Brew | |
which -s brew | |
if [[ $? != 0 ]] ; then | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
#Check and install QT | |
which -s qmake || brew install qt5 || brew link --force qt5 |
//implementation | |
/** | |
* @name flatten | |
* @brief flatten an array of arbitrarily nested arrays of integers into a flat array of integers. | |
* @params $array javascript array with no empty arrays allowed | |
* @return flat array of integers | |
* @example [[1,2,[3]],4] -> [1,2,3,4]. | |
*/ | |
function flatten(array){ |
//implementation | |
//Assumption: dont want to modify the original array, if this is not issue remove slice. | |
function sortByAge(array){ | |
return array.slice().sort((first,second) => first.age - second.age ); | |
} | |
//Test | |
var testDataWrongOrder = [{name: "Jhon", age:20}, {name: "Anne", age:10}, {name: "Jason", age:22}]; | |
var inverseOrder = [{name: "Jhon", age:20}, {name: "Anne", age:10}, {name: "Jason", age:22}]; | |
var CorrectOrder = [{name: "Anne", age:10}, {name: "Jhon", age:20}, {name: "Jason", age:22}]; |