Skip to content

Instantly share code, notes, and snippets.

View ZECTBynmo's full-sized avatar
💻
must go faster

Mike Vegeto ZECTBynmo

💻
must go faster
View GitHub Profile
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
@aranajhonny
aranajhonny / vpn.js
Created February 5, 2020 17:36
detect if are using vpn
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,
@ZECTBynmo
ZECTBynmo / Rocks.md
Last active March 12, 2019 23:26
Rocks

Rocks

Sync V3 Infrastructure Abstraction

Basics

At its core, the system is event driven.

ex: "a record changed", "an Entity changed", or [future event type]

@tpryan
tpryan / Makefile
Created April 19, 2017 21:54
Kubernetes Makefile
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:
@stesie
stesie / index.html
Created April 1, 2016 22:28
AWS IoT-based serverless JS-Webapp Pub/Sub demo
<!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>
@max-mapper
max-mapper / index.js
Created February 28, 2016 22:38
dat minimal example
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
@mjackson
mjackson / app.js
Created December 29, 2015 05:07
Using webpack with pixi.js
var PIXI = require('pixi.js')
console.log(PIXI)
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active July 6, 2024 19:43
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
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)
{
@max-mapper
max-mapper / index.js
Created June 2, 2014 01:16
dat w/ google drive blob storage
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)