Skip to content

Instantly share code, notes, and snippets.

@wellsie
wellsie / index.html
Created October 29, 2019 18:00 — forked from tmichel/index.html
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
@wellsie
wellsie / workspace.sh
Created April 11, 2018 14:13 — forked from dixson3/workspace.sh
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
@wellsie
wellsie / master.vm
Created July 8, 2017 20:56 — forked from rpgreen/master.vm
API Gateway "Send Everything" Mapping Template
## API Gateway "Send Everything" Mapping Template - Ryan Green - [email protected]
## See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
#set($allParams = $input.params())
{
"body-json" : "$input.json('$')",
"params" : {
#foreach($type in $allParams.keySet())
#set($params = $allParams.get($type))
"$type" : {
#foreach($paramName in $params.keySet())
@wellsie
wellsie / android_instructions.md
Last active May 8, 2017 18:37 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@wellsie
wellsie / build-jenkins.sh
Created October 6, 2016 20:04
jenkins container with version of choice
#!/bin/bash
docker build \
--build-arg JENKINS_VERSION=2.19.1 \
--build-arg JENKINS_SHA=dc28b91e553c1cd42cc30bd75d0f651671e6de0b \
--tag jenkins \
https://github.com/jenkinsci/docker.git
@wellsie
wellsie / get-ami.sh
Created September 15, 2016 15:36
get amazon linux ami (minimal, hvm, ebs, x86_64)
aws ec2 describe-images \
--owners amazon \
--filters \
Name=architecture,Values=x86_64 \
Name=virtualization-type,Values=hvm \
"Name=name,Values=*minimal*2016.03.3*"\
Name=root-device-type,Values=ebs \
| jq .Images[].ImageId -r
@wellsie
wellsie / chromium.sh
Created August 4, 2016 19:55
raspberry pi 3 - install chromium browser
#!/bin/bash
curl -L http://bintray.com/user/downloadSubjectPublicKey?username=bintray \
| sudo apt-key add -
echo "deb http://dl.bintray.com/kusti8/chromium-rpi jessie main" \
| sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install chromium-browser rpi-youtube -y
@wellsie
wellsie / GIF-Screencast-OSX.md
Created June 23, 2016 01:21 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@wellsie
wellsie / clone-all.sh
Created June 7, 2016 21:13
clone all organization github repos
#/bin/bash -eux
# check for jq
jq --version
ORG="<organization"
USER="<user>"
TOKEN="<token>"
curl -s https://api.github.com/orgs/${ORG}/repos\?per_page\=200 -u ${USER}:${TOKEN} \
| jq '.[].ssh_url' \
@wellsie
wellsie / clone-all.sh
Created June 7, 2016 21:13
clone all organization github repos
#/bin/bash -eux
# check for jq
jq --version
ORG="<organization"
USER="<user>"
TOKEN="<token>"
curl -s https://api.github.com/orgs/${ORG}/repos\?per_page\=200 -u ${USER}:${TOKEN} \
| jq '.[].ssh_url' \