https://developer.github.com/early-access/graphql/explorer/
query {
viewer {
login
name
pullRequests(last: 10) {
totalCount
edges {
void successfulAsserts(int x) { | |
assert(true); | |
assert(x != null); | |
assert(x == 1); | |
int foo = 1; | |
assert(foo == 1); | |
} | |
void failingAssert() { | |
assert(false); |
{ | |
"sourceSpace": "XXX", | |
"destinationSpace": "YYY", | |
"sourceDeliveryToken": "AAA", | |
"managementToken": "ZZZ", | |
"syncTokenDir": "/tmp/contentful-sync", | |
"rateLimit": 1, | |
"rateLimitPeriod": 5000 | |
} |
(function(url) { | |
// Create a new `Image` instance | |
var image = new Image(); | |
image.onload = function() { | |
// Inside here we already have the dimensions of the loaded image | |
var style = [ | |
// Hacky way of forcing image's viewport using `font-size` and `line-height` | |
'font-size: 1px;', | |
'line-height: ' + this.height + 'px;', |
/i(?:P(?:hone|od|ad)|Book|Mac|Cloud)/.exec("Apple iPhone 7") |
https://developer.github.com/early-access/graphql/explorer/
query {
viewer {
login
name
pullRequests(last: 10) {
totalCount
edges {
Instructions to setup OpenStack + Kubernetes development environment on VirtualBox
Total time for the setup is about 45 minutes but most of it is waiting packages to download and install.
Download Ubuntu and install it on VirtualBox (20min)
Start the Ubuntu (1min)
Install git (1min)
sudo apt install git
Follow instructions on http://docs.openstack.org/developer/devstack/ (20min)
console.log('Loading function'); | |
var doc = require('dynamodb-doc'); | |
var dynamo = new doc.DynamoDB(); | |
/** | |
* Provide an event that contains the following keys: | |
* | |
* - operation: one of the operations in the switch statement below | |
* - tableName: required for operations that interact with DynamoDB |
Error: watch ENOENT | |
at errnoException (fs.js:1030:11) | |
at FSWatcher.start (fs.js:1062:11) | |
at Object.fs.watch (fs.js:1087:11) | |
at Gaze._watchDir (/home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30) | |
at /home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10 | |
at iterate (/home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5) | |
at /home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:61:11 | |
at /home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:420:5 | |
at iterate (/home/antti/work/web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5) |
function (input) { | |
function product(numbers) { | |
if (numbers.indexOf("0") !== -1) { | |
return 0 | |
} else { | |
return _(numbers).reduce(function(product, number){ | |
return product * number | |
}, 1) | |
} | |
} |
myObject = | |
myFunction: loadFunction 'myModule/myFunction', this |