Skip to content

Instantly share code, notes, and snippets.

@CodeMonkeyKevin
CodeMonkeyKevin / Dockerfile
Last active January 12, 2020 23:22
Terraform docker runner
FROM golang:alpine
MAINTAINER "HashiCorp Terraform Team <terraform@hashicorp.com>"
ENV TERRAFORM_VERSION=0.12.19
RUN apk add --update git bash openssh make curl nodejs yarn
# Set timezone to UTC by default
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
import time
import requests
import concurrent.futures
from concurrent.futures import ThreadPoolExecutor
from time import sleep
import urllib.request
import ssl
pool = ThreadPoolExecutor(10)
# https://github.com/macvim-dev/macvim/wiki/Building-%28not-recommended-way%29
# Patch
# https://github.com/macvim-dev/macvim/pull/648/commits/bf592174bd83ba486df77886b93dba49d214ac13
make distclean
./configure --prefix=/usr/local \
--with-features=huge \
--enable-multibyte \
@CodeMonkeyKevin
CodeMonkeyKevin / checkpoint.sh
Last active May 23, 2016 17:05 — forked from bubenkoff/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
# Usage: checkpoint.sh load|unload
# You will need sudo power, of course
#
if [ $1 == "unload" ]
@CodeMonkeyKevin
CodeMonkeyKevin / import_bitstamp_data.go
Created June 11, 2014 03:09
Load Bitstamp Historical Data Into Redis
package main
import (
"bytes"
"compress/gzip"
"encoding/csv"
"fmt"
"github.com/cheggaaa/pb"
"github.com/garyburd/redigo/redis"
"io"
@CodeMonkeyKevin
CodeMonkeyKevin / gist:6407086
Created September 1, 2013 20:26
GoLang UUID pkgs benchmark
// github.com/nu7hatch/gouuid
BenchmarkV4 1000000 1426 ns/op
BenchmarkV5 2000000 910 ns/op
// github.com/streadway/simpleuuid
BenchmarkV5 5000000 689 ns/op
// github.com/tux21b/gocql/tree/master/uuid
BenchmarkRandomUUID 1000000 1470 ns/op
@CodeMonkeyKevin
CodeMonkeyKevin / TCP dump that shows param was sent
Created July 10, 2013 15:25
disappearing params rails4/rack
&[..&[..POST /test HTTP/1.1
User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
Host: 127.0.0.1:3000
Accept: */*
Content-Type: text/xml
Content-Length: 17
<test>data</test>
11:24:09.721072 IP localhost.hbci > localhost.52227: Flags [.], ack 212, win 9173, options [nop,nop,TS val 643548888 ecr 643548888], length 0
E..4..@.@...............G.i...SF..#..(.....
⮀ brew doctor
Your system is ready to brew.
⮀ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: http://github.com/mxcl/homebrew.git
HEAD: a89d55c6253b87f94d27a083d723616c32298c1c
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
@CodeMonkeyKevin
CodeMonkeyKevin / gist:4004679
Created November 2, 2012 22:14
MS HEROKU HTTP CAL
require 'rest-client'
RestClient.post("http://#{API_KEY}@heroku.moonshado.com/sms", :sms => {:device_address => "17071231234", :message => "test"})
@CodeMonkeyKevin
CodeMonkeyKevin / kestrel.sh
Created August 26, 2012 06:49
Kestrel init.d script fixed disown issue and /var/run/$APP_NAME dir check/creation
#!/bin/bash
#
# kestrel init.d script.
#
# All java services require the same directory structure:
# /usr/local/$APP_NAME
# /var/log/$APP_NAME
# /var/run/$APP_NAME
APP_NAME="kestrel"