apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: null
labels:
kops.k8s.io/cluster: prod.my.cluster
name: spot-nodes
spec:
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210415
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
function detectVPN() { | |
var browserTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone | |
return fetch(`https://ipapi.co/json`) | |
.then(function(response) { return response.json() }) | |
.then(function (data) { | |
var ipTimezone = data.timezone | |
console.log(`browser timezone: ${browserTimezone}`, `ip timezone: ${ipTimezone}`) | |
return { | |
browser: browserTimezone, |
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
BASEDIR = $(shell pwd) | |
RULELIST = $(shell gcloud compute forwarding-rules list --format='value[terminator=" "](name)') | |
include Makefile.properties | |
all: cluster app | |
app: db api frontend | |
# Requests a GKE cluster | |
cluster: |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>AWS IoT Pub/Sub Demo</title> | |
</head> | |
<body> | |
<h1>AWS IoT Pub/Sub Demo</h1> | |
<form> | |
<button type="button" id="connect">connect!</button> |
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
var Swarm = require('discovery-swarm') | |
var Hyperdrive = require('hyperdrive') | |
var Level = require('level') | |
// run this like: node thisfile.js 4c325f7874b4070blahblahetc | |
// the dat link someone sent us, we want to download the data from it | |
var link = new Buffer(process.argv[2], 'hex') | |
// here are the default config dat uses: | |
// used for MDNS and also as the dns 'app name', you prob shouldnt change this |
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
var PIXI = require('pixi.js') | |
console.log(PIXI) |
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
var Util = require('util'); | |
var Https = require('https'); | |
var Tls = require('tls'); | |
/** | |
* HTTPS Agent for node.js HTTPS requests via a proxy. | |
* blog.vanamco.com/connecting-via-proxy-node-js/ | |
*/ | |
function HttpsProxyAgent(options) | |
{ |
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
var path = require('path') | |
var fs = require('fs') | |
var Dat = require('dat') | |
var gdb = require('google-drive-blobs') | |
var tokens = JSON.parse(fs.readFileSync(path.join(process.env.HOME, '.config', 'googleauth.json'))) | |
tokens.client_id = process.env['GOOGLE_CLIENT'] | |
tokens.client_secret = process.env['GOOGLE_SECRET'] | |
var blobs = gdb(tokens) |
NewerOlder