$ bq load --source_format=NEWLINE_DELIMITED_JSON test_dataset.cmdline_test ./test_table_nested.json ./schema.json
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 private-gcloud-set { | |
export GCLOUD_TESTS_API_KEY='...' | |
export GCLOUD_TESTS_PROJECT_NUMBER='...' | |
} | |
function gcloud-set { | |
private-gcloud-set | |
gcloud-unset | |
export GCLOUD_PROJECT=nth-circlet-705 | |
export GCLOUD_TESTS_PROJECT_ID=nth-circlet-705 |
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
'use strict' | |
var storage = require('@google-cloud/storage')() | |
var bucket = storage.bucket('[BUCKET NAME]') | |
exports.test = function test (event, callback) { | |
var file = bucket.file('new-file-again-' + Date.now()) | |
file.save('hi', { resumable: false }, callback) | |
} |
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
Clone: | |
google-auth-library-nodejs | |
google-auto-auth | |
google-gax | |
google-cloud-node | |
cd google-auth-library-nodejs # on correct branch | |
npm link |
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
// A) | |
datastore | |
.runTransaction(function(err, transaction) { | |
if (err) { | |
// Could not start transaction | |
return Promise.reject(err) | |
} | |
// ...transaction stuff... | |
return transaction.commit() |
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
const _KEY = '__key__' | |
const DS = require('@google-cloud/datastore')() | |
const TABLE = 'Members10' | |
function getAuThoB(hash_) { | |
return Promise.resolve().then(function () { | |
const ret = {} | |
ret.role = true |
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
[ | |
{ | |
"d": [ | |
{ | |
"id": "zx83", | |
"a": 1, | |
"b": 2 | |
}, | |
{ | |
"id": "f8f7", |
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
> npm run prepare-ghpages vision 0.6.0 master [5517111] | |
> google-cloud-node@ prepare-ghpages /Users/stephen/dev/gcloud-node | |
> node ./scripts/docs/prepare.js "vision" "0.6.0" | |
git rev-parse --abbrev-ref HEAD | |
master | |
git submodule add -q -b gh-pages https://github.com/GoogleCloudPlatform/google-cloud-node.git gh-pages | |
git rev-parse --abbrev-ref HEAD | |
gh-pages |
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
var flatten = require('lodash.flatten') | |
var prop = require('propprop') | |
var requests = [ | |
{ | |
mutations: [ | |
{ a: 'b' }, | |
{ c: 'd' } | |
] | |
}, |
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
Vision.prototype.detect = function(images, options, callback) { | |
var self = this; | |
var isSingleImage = !is.array(images) || images.length === 1; | |
if (!is.object(options)) { | |
options = { | |
types: options | |
}; | |
} |