Skip to content

Instantly share code, notes, and snippets.

View taylorsmithgg's full-sized avatar

Taylor Smith taylorsmithgg

  • Independent
  • United States
View GitHub Profile
#!/bin/node
const commandLineArgs = require('command-line-args');
const beautify = require('js-beautify').js_beautify;
let migrate = require("../lib/migrate");
const fs = require("fs");
const path = require("path");
const _ = require("lodash");
import java.util.*;
import java.util.stream.Collectors;
public class Infix {
public static String infixToPostfix(String infixexpr) {
HashMap<String, Integer> prec = new HashMap<>();
prec.put("*", 3);
prec.put("/", 3);
prec.put("+", 2);
prec.put("-", 2);
from pythonds.basic.stack import Stack
def postfixEval(postfixExpr):
operandStack = Stack()
tokenList = postfixExpr.split()
for token in tokenList:
if token in "0123456789":
operandStack.push(int(token))
else:
from pythonds.basic.stack import Stack
def infixToPostfix(infixexpr):
prec = {}
prec["*"] = 3
prec["/"] = 3
prec["+"] = 2
prec["-"] = 2
prec["("] = 1
opStack = Stack()

The 10x Manifesto

In 1926, Henry Ford introduced the concept of the 40-hour work week. This schedule was optimized for assembly line workers in Ford's automobile plants.

Since Ford's era, thanks to technology, the nature of our work has shifted from repetitive manual labor to creative problem-solving. But there has been no associated recalibration of our work schedules. A computer programmer at Google in 2012 has roughly the same schedule as a Model T assembler at Ford Motor Company in 1926.

The difference is, an individual programmer has far more ability to create value for society than an individual assembly line worker. Instagram was worth $1 billion after less than two years. Youtube was worth $1.6 billion after 18 months. Each was built by a handful of people.

If one programmer is potentially so valuable to society, why is a full-time job still the default work scenario? It's in society's best interests to free up the hackers to hack. We are forcing brilliant, technology-empowered people to limi
@taylorsmithgg
taylorsmithgg / README.md
Last active September 12, 2017 17:59
hydra

Docker

Quick up & running demo using Postgres + UI

git clone https://github.com/ory/hydra.git
cd hydra
docker-compose up

Emulate SSH

data "template_file" "cloud-config" {
template = "${ file( "${ path.module }/cloud-config.yml" )}"
vars {
region = "${ var.aws["region"] }"
internal-tld = "${ var.internal-tld }"
s3-bucket = "${ var.s3-bucket }"
region = "${ var.region }"
name = "${ var.name }"
ssl-tar = "/ssl/k8s-etcd.tar"
# -----------------------------------------------------------------------------
# NETWORK SERVICES: DHCP
# FIX: modularize: https://github.com/todd-dsm/tf_aws_vpc_dhcp_options
# -----------------------------------------------------------------------------
module "dhcp_options" {
source = "github.com/todd-dsm/tf_aws_vpc_dhcp_options?ref=v0.1"
}
resource "aws_vpc_dhcp_options" "dev" {
domain_name = "dev.ptest.us"
resource "aws_route53_zone" "internal" {
comment = "Kubernetes cluster DNS (internal)"
name = "${ var.internal-tld }"
tags {
builtWith = "terraform"
KubernetesCluster = "${ var.name }"
kz8s = "${ var.name }"
Name = "k8s-${ var.name }"
}
vpc_id = "${ var.vpc-id }"
SHELL += -eu
BLUE := \033[0;34m
GREEN := \033[0;32m
RED := \033[0;31m
NC := \033[0m
export PATH := ~/go/bin:/root/.local/bin:/root/go/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
export DIR_KEY_PAIR := .keypair
export DIR_SSL := .cfssl