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
monthlyUserSignins | |
function main() {return join(Events({from_date: "<<fromDate>>",to_date: "<<toDate>>",event_selectors: [{event: "USER_SIGN_IN"}]}), People(), {type: "inner"}).map(function (result) {var date = new Date(result.event.time);var dd = (date.getDate() < 10 ? "0" : "") + date.getDate();var MM = ((date.getMonth() + 1) < 10 ? "0" : "") + (date.getMonth() + 1);var yyyy = date.getFullYear();return {"date": MM+"-"+dd+"-"+yyyy,"userId":result.user.properties["External ID"],"isDeepLinkSession":result.event.properties.isDeepLinkSession}}).groupBy(["userId"],mixpanel.reducer.count()).map(result => ({"userId": result.key[0],"count": result.value})).reduce(mixpanel.reducer.count())} | |
monthlyUserStarted | |
function main() {return join(Events({from_date: "2019-11-01",to_date: "2019-11-30",event_selectors: [{event: "WATCH_NAVIGATION"},{event: "UNDERSTAND_NAVIGATION"},{event: "PRACTICE_NAVIGATION"}]}), People(), {type: "inner"}).map(result => ({"eventName": result.event.name,"skillId": result.event.properties["Sk |
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
web: bundle exec unicorn -p 3000 -c ./config/unicorn.rb | |
resque: env TERM_CHILD=1 COUNT=3 QUEUE=high,normal,low RESQUE_TERM_TIMEOUT=5 bundle exec rake resque:work |
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
function flatten (arr) { | |
if (!Array.isArray(arr)) { | |
return arr | |
} | |
return arr.reduce((memo, elem) => { | |
if (Array.isArray(elem)) { | |
return memo.concat(flatten(elem)) | |
} else { | |
return memo.concat(elem) |
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
docker run --net=host -d gcr.io/google_containers/etcd:2.0.9 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data | |
docker run --net=host --privileged -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v0.21.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests --containerized | |
docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0.21.2 /hyperkube proxy --master=http://127.0.0.1:8080 --v=2 | |
Differs from the docs at http://kubernetes.io/v1.0/docs/getting-started-guides/docker.html in that the kublet must be run with the | |
--privileged flag in order to mount volumes. |
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
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
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
mongodump -h candidate.12.mongolayer.com:10054 -d *db name* -u *username* -p *password* -o *output-dir* |
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
sudo /usr/local/mysql/support-files/mysql.server start | |
http://stackoverflow.com/questions/25700971/fatal-error-please-read-security-section-of-the-manual-to-find-out-how-to-run |