Skip to content

Instantly share code, notes, and snippets.

View lynsei's full-sized avatar
:octocat:
Will code for food

Lynsei lynsei

:octocat:
Will code for food
View GitHub Profile
/*`de x&* ``^~x&* *``^~x&*`` *``^~x&* *``^~x&*`` *``^~x&*`` *``^*``^~x~x&*``~ `*xc
`` `
` _____ ______ _________________________________ _____ ______ _______ (R) `
` | ||_____] | |______| | | | || \|______ `
` |_____||_____]__| |______|_____ | |_____ |_____||_____/|______ `
` `^*+**: Disruptiveware, LLP. `
` `
@lynsei
lynsei / Colored Countdown.markdown
Created December 17, 2015 06:45
Colored Countdown
@lynsei
lynsei / Colored Countdown.markdown
Created December 17, 2015 06:45
Colored Countdown
@lynsei
lynsei / hmac.dynamodb.examples.go
Created December 19, 2015 03:41
gist copied code that I can reference in the future for creating go-language compiled endpoints for web socket apps
// this shows a client implementation for HTTP & HMAC hashing using AES256bit encryption
// it also shows date functions and other things that might be useful as I start to move all my gateway code to compiled go-lang interfaces
// copied from: https://github.com/tav/dynamodb/blob/master/dynamodb.go#L436
// looking forward towards implementing this kind of code for ubernetes and beanstalk containers
func (c *Client) RawRequest(method string, payload []byte) ([]byte, error) {
req, err := http.NewRequest("POST", c.endpoint.url, bytes.NewReader(payload))
if err != nil {
return nil, err
@lynsei
lynsei / Gemfile
Created December 20, 2015 22:38 — forked from ahaedike/Gemfile
source "https://rubygems.org"
gem 'eventmachine'
gem 'rubysl-stringio'
gem 'sinatra'
gem 'yajl-ruby', require: 'yajl'
gem 'thin'
gem 'em-websocket', :git=>'https://github.com/igrigorik/em-websocket.git'
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
--> ok so I do this:
aws s3 sync s3://one.region s3://to.another --dryrun --profile pms-east --source-region us-east-1 --region us-west-1 --sse-c AES256 --sse-c-key '496ea1ea1b35561e2342342474db682692a8bbf03f3e22aasdasd1c9fed1a9b605a69137'
--> and on the dry run it says:
"Completed 56 part(s) with ... file(s) remaining
(dryrun) copy: s3://blah to s3://blah2 etc..."
--> when I take off the dryrun I get this on every single file copy when using --sse-c in tandem with --sse-c-key:
"A client error (InvalidArgument) occurred when calling the CreateMultipartUpload operation:
The secret key was invalid for the specified algorithm."
@lynsei
lynsei / WordPress gulpfile.js
Created February 14, 2016 05:08 — forked from ataylorme/WordPress gulpfile.js
WordPress gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-sass'),
minifyCss = require("gulp-minify-css"),
autoprefixer = require("gulp-autoprefixer"),
imagemin = require('gulp-imagemin'),
notify = require("gulp-notify"),
rename = require("gulp-rename"),
cmq = require('gulp-combine-media-queries'),
uglify = require('gulp-uglify'),
@lynsei
lynsei / gist:25ffd66e1c50c47aed8b
Last active March 4, 2016 10:22
ubuntu trusty with rancher server using jwilder reverse proxy... exact steps I took on aws ec2
##://----------------------------------------------------------------------------------------------------------------
##:// I provisioned a ubuntu 14.4 trusty ec2 instance with 15G space on SSD, then ran the following:
##://----------------------------------------------------------------------------------------------------------------
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo vi /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
@lynsei
lynsei / gist:75346d3259989e0c6ef5
Last active March 8, 2016 14:19
my guide to setting up PGP properly
# My guide to setting up PGP/OpenPGP keys the correct way
# download gpg-keygen.py python script and run it. it's slow but it creates your gpg profile the correct way, and that's why it's slow
$ cd ~/; wget https://raw.githubusercontent.com/object-code/gpg-keygen/master/gpg-keygen.py;
## deploy gpg using latest python scripting methods from gpg-keygen
$ sudo ~/gpg-keygen.py --t /root/.gnupg/whomever --step generateMasterKey \
--master-key-length 4096 \
--master-key-type RSA \