Skip to content

Instantly share code, notes, and snippets.

View sepulworld's full-sized avatar
🤘

Zane Williamson sepulworld

🤘
View GitHub Profile
@sepulworld
sepulworld / example_aws_iam_policy_asg_access.tf
Created September 2, 2016 18:35
Autoscaling Group policy access
resource "aws_iam_policy" "AutoScaleGroupAccess" {
name = "AutoScaleGroup-${var.service_name}-${var.environment}"
description = "Autoscaling Group Access ${var.service_name}-${var.environment}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
@sepulworld
sepulworld / service-watchdog.service
Created September 2, 2016 18:30
Watchdog systemd unit
[Unit]
Description=service-watchdog for custom app, report to aws autoscaling group
Requires=fetch-tweets.service
After=fetch-tweets.service
[Service]
User=root
ExecStart=/usr/local/bin/service-watchdog fetch-tweets us-west-2
[Install]
@sepulworld
sepulworld / aptly-cli-docker.sh
Last active October 19, 2016 17:06
Docker Aptly-cli run
alias aptly-cli='\
docker run \
-v ~/.config/aptly-cli/aptly-cli.conf:/etc/aptly-cli.conf \
-it --rm --name=aptly-cli \
sepulworld/aptly-cli'
@sepulworld
sepulworld / keybase.md
Created June 25, 2016 14:42
keybase.md

Keybase proof

I hereby claim:

  • I am sepulworld on github.
  • I am zanewilliamson (https://keybase.io/zanewilliamson) on keybase.
  • I have a public key whose fingerprint is 0A3E C1FE 6EE7 C501 0D7B 27BB F9A3 AD35 CC6E 0286

To claim this, I am signing this object:

set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-markdown'
Bundle 'vim-scripts/FuzzyFinder'
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind right:alt resize +10% +0
bind left:alt resize -10% +0
@sepulworld
sepulworld / update_bamboo_w_mono_nunit_sharp.sh
Created November 1, 2015 21:35
update_bamboo_w_mono_nunit_sharp
#!/bin/bash
# Prep steps
# docker pull atlassian/bamboo-java-agent
# sudo docker run --name="tmp-atlassian-java-agent-<VERSION>" -e HOME=/root/ -i -t atlassian/bamboo-java-agent:latest /bin/bash
# run following insde containter and exit
# docker login
# docker commit tmp-name sepulworld/georiot_bamboo:<new_version>
# docker push sepulworld/georiot_bamboo:<new_version>
@sepulworld
sepulworld / aptly_publish.txt
Last active September 2, 2016 00:00
So basic Aptly publish steps
# build fpm
fpm-cook clean
fpm-cook
# upload deb file
aptly-cli file_upload --upload ./nginx-dbg_1.9.6-1-trusty_amd64.deb --directory /nginx
# import uploaded deb into repo (example repo is named stable-repo in Aptly server)
aptly-cli repo_upload --name stable-repo --dir nginx
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind right:alt resize +10% +0
bind left:alt resize -10% +0
var http = require('http');
exports.handler = function(event, context) {
var responses = {},
count = 0;
for (var key in event ) {
console.log('start request to ' + event[key]);
http.get(event[key], function(res) {
console.log("Got response: " + res.statusCode);