This file contains hidden or 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
const input = [1, 1, 1, 2, 3, 3, 5, 9] | |
const omitMultiples = list => { | |
// Count the numbers in the list | |
const counts = list | |
.reduce((acc, el) => { | |
const item = acc[el] || 0 | |
acc[el] = item + 1 | |
return acc | |
}, {}) |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am cryptoquick on github. | |
* I am crypt0quick (https://keybase.io/crypt0quick) on keybase. | |
* I have a public key ASA5wRRcOJh_2IlmqxjcXvilHqyO0UrhGmNEzLK1DrrEAgo | |
To claim this, I am signing this object: |
This file contains hidden or 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
pragma solidity 0.4.21; | |
// ContentCollection is meant to store hashes from IPFS in a "Collection" format (array of structs), per user. | |
contract ContentCollection { | |
// Content types / Mime Types | |
// 0 - deleted | |
// 1 - text/plain | |
// 2 - application/json | |
// 3 - image/jpeg | |
// 4 - image/png |
This file contains hidden or 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
const romanNumerals = [ | |
[1000, "M"], [500, "D"], [100, "C"], | |
[50, "L"], [10, "X"], [5, "V"], [1, "I"] | |
]; | |
const toRomeRecursion = (function convert(index, number) { | |
if (number === 0) return ''; | |
let [romanNumber, romanLiteral] = romanNumerals[index]; | |
if (number < romanNumber) return convert(index+1, number); |
This file contains hidden or 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
server { | |
listen 80 default_server; # if this is not a default server, remove \"default_server\" | |
listen [::]:80 default_server ipv6only=on; | |
root /usr/share/nginx/html; # root is irrelevant | |
index index.html index.htm; # this is also irrelevant | |
server_name your.app.url; # the domain on which we want to host the application. | |
# redirect non-SSL to SSL |
This file contains hidden or 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
#!/bin/bash | |
# External Parameters: MONGO_URL, MONGO_OPLOG_URL, ROOT_URL, METEOR_SETTINGS, KADIRA_APP_ID, KADIRA_APP_SECRET | |
export MONGO_URL=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/MONGO_URL -H "Metadata-Flavor: Google") | |
export MONGO_OPLOG_URL=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/MONGO_OPLOG_URL -H "Metadata-Flavor: Google") | |
export ROOT_URL=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/ROOT_URL -H "Metadata-Flavor: Google") | |
export METEOR_SETTINGS=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/METEOR_SETTINGS -H "Metadata-Flavor: Google") | |
export KADIRA_APP_ID=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/KADIRA_APP_ID -H "Metadata-Flavor: Google") | |
export KADIRA_APP_SECRET=$(curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/KADIRA_APP_SECRET -H "Metadata-Flavor: Google") |
This file contains hidden or 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
#! /bin/bash | |
# Variables | |
PROJECT="your-google-project-name" | |
gcloud config set project $PROJECT | |
# Upload to Bucket | |
# Comment these out once used, because changes to these happen rarely | |
gsutil cp startup.sh gs://$PROJECT/scripts/meteor_startup.sh |
This file contains hidden or 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
#! /bin/bash | |
# Meteor Build | |
mkdir -p ../app-build | |
meteor build ../app-build --architecture os.linux.x86_64 |
This file contains hidden or 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 React from 'react' | |
import Dimensions from 'react-dimensions' | |
import Infinite from 'react-infinite' | |
import ImageCard from './ImageCard' | |
const ImageGroups = ({ | |
items, | |
containerWidth, | |
itemWidth, |
This file contains hidden or 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
const c = 'c' | |
const target = { | |
a: true, b: 1 | |
}; | |
const anotherObj = { | |
c | |
}; |