- Create a new profile:
luther:~ ameredith$ gcloud config configurations create my-profile
Created [my-profile].
Activated [my-profile].
- Authenticate with Google
pub trait Visitable { | |
fn accept<V: Visitor>(&self, visitor: &mut V) -> V::Result; | |
} | |
pub trait Visitor { | |
type Result; | |
fn visit_num(&mut self, num: &Num) -> Self::Result; | |
fn visit_add<T, U>(&mut self, add: &Add<T, U>) -> Self::Result |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.editor { | |
position: absolute; | |
min-height: 100%; |
// XXHash | |
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.XXH=r():t.XXH=r()}(this,function(){return function(t){function r(e){if(i[e])return i[e].exports;var o=i[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var i={};return r.m=t,r.c=i,r.d=function(t,i,e){r.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var i=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(i,"a",i),i},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=2)}([function(t,r,i){"use strict";(function(t){function e(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(t,r |
extern crate actix; | |
extern crate actix_web; | |
extern crate futures; | |
use std::thread; | |
use std::io::{self, Write}; | |
use actix::prelude::*; | |
use actix_web::{Error as ActixWebError, HttpMessage}; | |
use actix_web::client; | |
use futures::future::{self, Future}; |
const POOL_SIZE = 4 * 1024; | |
let mySchema = ['int32', 'char(32)', 'int32']; | |
let bufferPool = new ArrayBuffer(POOL_SIZE); | |
let dir = { | |
tbl: { | |
people: { offset: 0, size: 0 } | |
} | |
}; |
class Bucket { | |
constructor(size, per) { | |
this.per = per; | |
this.size = size; | |
this.lastFilled = Math.floor(Date.now() / 1000); | |
this.tokens = size; | |
} | |
take() { |
const promise_ = Symbol('promise'); | |
class Deferred { | |
constructor() { | |
this[promise_] = new Promise((resolve, reject) => { | |
this.resolve = resolve; | |
this.reject = reject; | |
}); | |
} |
#!/bin/bash | |
cleanup_db() { | |
docker stop mysql_sandbox &>/dev/null | |
docker rm mysql_sandbox &>/dev/null | |
docker network inspect mysql_sandbox > /dev/null 2>&1 | |
if [[ "$?" == "0" ]]; then | |
docker network rm mysql_sandbox | |
fi |
function findNode(node, pred) { | |
if (pred(node)) { | |
return node; | |
} | |
if (typeof node == 'object' && node.constructor == Object) { | |
for (var prop in node) { | |
if (node.hasOwnProperty(prop)) { | |
let foundNode = findNode(node[prop], pred); |