Skip to content

Instantly share code, notes, and snippets.

Running "test" task
Running "connect:test" (connect) task
Starting connect web server on localhost:4243.
Running "shell:mochaPhantom" (shell) task
Running "mantriDeps:testCase" (mantriDeps) task
Dependency file created: temp/deps.js
(function(global) {
'use strict';
if (global.webkitNotifications || typeof Notification == 'undefined') return;
global.webkitNotifications = {
createNotification: createNotification,
PERMISSION_ALLOWED: 0,
PERMISSION_NOT_ALLOWED: 1,
PERMISSION_DENIED: 2,
checkPermission: function() { return permission; },
@adambom
adambom / actions.js
Last active May 8, 2019 03:02
user.js
var pb = require('../lib/pb');
var pbHelpers = require('../lib/pb-helpers');
var user = require('./user');
var auction = require('./auction');
var subject = require('./subject');
var CommandType = pb.PBCommandEnvelope.CommandType;
var ErrorType = pb.PBError.ErrorType;
@adambom
adambom / test.js
Last active September 2, 2015 21:59
sendMessages([{message: "System working"}, {message: "All systems go"}])
@adambom
adambom / announce-2015-09-16.js
Created September 16, 2015 16:53
announce-2015-09-16.js
looker_global_messages([{message: "All data currently delayed to an outage in Benzene"}])
looker_global_messages([{message: "Grid outage around 12AM PDT on 10/19 is causing delays in Mobile and Video data (all tables). Issue is resolved and Sputnik should be up to date by 4-5 PM PDT on 10/19."}])
@adambom
adambom / update.js
Created December 7, 2015 20:13
Looker Downtime
looker_global_messages([{message: "Looker will be down for an upgrade for approximately 5 minutes at 5pm PST on 12/17/15."}])
// Pacakge msgme implements a lightweight library for publishing messages to and
// consuming messages from an amqp-compatible message queue.
package msgme
import (
"github.com/streadway/amqp"
)
type Broker struct {
@adambom
adambom / README.md
Last active May 27, 2024 07:51
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@adambom
adambom / graphql.js
Created December 4, 2017 17:52
Place these files into the same directory
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();