Skip to content

Instantly share code, notes, and snippets.

View kyleburton's full-sized avatar

Kyle Burton kyleburton

View GitHub Profile
@kyleburton
kyleburton / bot-verbs.txt
Last active November 7, 2023 21:43
The list of 'bot-verbs' that we give to new team members.
Philosophical:
* writing lines of code is one of the least valuable things I can do
* cultivate your impatience
* reject the status quo, unless we can re-derive it from first-principles
* engineers imprint on the first languages (techniuqes, frameworks or technology) that we find success with (unconsciously seen as caregivers, which we defend w/o always knowing why)
* we tend to overvalue the familiar/known; we tend to undervalue the unfamiliar/unknown, this interferes with our receptiveness to new ideas and personal growth
* we're 90% composed of bad habits; many of our best habits become bad as time passes; this allows us to filter for the fundamental; the great
* make doing the right thing easier than any other thing, or we will fail to achieve greatness, or break bad habits
* be conscious, be intentional
* "is this the highest we can aim?" (I prefer this over "is this the best we can do", the former is aspirational, the latter is judgemental)
@kyleburton
kyleburton / simple-ivr-simulator.sh
Created February 16, 2011 21:04
Simple IVR Simulator for testing out user experience (Works on OSX)
VOICE="Vicki"
BALANCE="100"
function voice_prompt () {
echo " SPEAKING: $1"
say -v "$VOICE" "$1"
}
function get_user_keypress () {
KEY=""
#!/usr/bin/env bash
set -eEu -o pipefail
# set -x
WORKSPACES="project-web project-admin cider-scratchpad lambda-handler api-tests terraform project-web-tests project-admin-tests"
COMMANDS="urls reset gist shutdown stop workspaces commands all"
function workspace-name-for-abbreviation {
case "$1" in
@kyleburton
kyleburton / az
Last active April 11, 2022 05:16
linux project launcher (eg: az/ht)
#!/usr/bin/env bash
set -eEu -o pipefail
# set -x
WORKSPACES="project-web project-admin cider-scratchpad lambda-handler api-tests terraform cypress-web cypress-admin"
COMMANDS="urls reset gist shutdown stop workspaces commands all"
function workspace-name-for-abbreviation {
case "$1" in
public class Test {
public static String evenOrOdd(int val) {
if (0 == (val % 2)) {
return "even";
}
return "odd";
}
public static String evenOrOdd(long val) {
if (0 == (val % 2)) {
return "even";
/*
* Don't cheat!
*
* javac Foo.java && java Foo
*
*/
public class Foo {
public static void main (String [] args) {
System.out.println("option1\n\n");
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
@kyleburton
kyleburton / google-sheet-script.js
Created August 30, 2019 23:01
counting colored cells in google sheets
// =countbackgrounds("C2:K2","#00ff00")
/*
it's a bit of a hack to send in the cell range as a string, though it works when calling getRange:
SpreadsheetApp.getActiveSpreadsheet().getRange(range)
This also means you can't "fill down" to have the ranges updated to match your sheet, so hack number two genreates
the formulas so you can copy/paste them into the sheet:
@kyleburton
kyleburton / ccard.feature
Created June 2, 2011 20:58
Cucumber for testing my Twilio "La Cosa Nostra" IVR
Feature: La Cosa Nostra IVR Workflow
In order to register a credit card I want to call the La Cosa Nostra IVR
and simulate a phone call.
Background: As part of each Scenario I want to set my defaults.
Given my telephone number is "(100) 000-0001"
And I am testing the "CCard" workflow.
And I call the IVR.
Scenario: I register my card in one step and sign up for all services.
(let [chars (->
"01000010 01000101 01000101 01010010"
(.split " ")
vec)
nums (mapv #(Integer/parseInt % 2)
chars)]
(mapv #(-> % char str) nums))