Skip to content

Instantly share code, notes, and snippets.

@artbikes
artbikes / user-data.txt
Created October 24, 2019 22:20 — forked from RichardBronosky/user-data.txt
Chef Bootstrapping an EC2 instance immediately and handsfree using cloud-init user-data
#cloud-config
#
# This is an example file to automatically install chef-client and run a
# list of recipes when the instance boots for the first time.
# Make sure that this file is valid yaml before starting instances.
# It should be passed as user-data when starting the instance.
#
# This example assumes the instance is 16.04 (xenial)
@artbikes
artbikes / cleanup-ami.py
Created October 21, 2019 14:59 — forked from marvinpinto/cleanup-ami.py
Python script to clean up and update the Jenkins AMIs after a successful Packer run
#!/usr/bin/python
import requests
import os
import boto.ec2
import sys
import re
build_url = os.environ['BUILD_URL']
jenkins_base_url = os.environ['JENKINS_URL']
@artbikes
artbikes / README.md
Created October 8, 2019 16:37 — forked from shortjared/README.md
If you have ever wanted to grab a marketplace AMI (ex: OpenVPN) you'll know that the process is painful. This solves the pain.

Usage

  • You will need to first make sure you have subscribed to the marketplace product
  • Get the AMI of the marketplace
  • Copy the script to machine
  • awsume (or otherwise authorize) to AWS
  • chmod the script to be executable if needed chmod +x marketplace-ami-encryptor.sh

Usage ./marketplace-ami-encryptor.sh {region} {ami} {name}
Example: ./marketplace-ami-encryptor.sh us-east-1 ami-f6eed4e0 OpenVPN

@artbikes
artbikes / Dockerfile
Created May 9, 2019 22:50 — forked from lenalebt/Dockerfile
Installing Taskwarrior in Kubernetes
FROM ubuntu:18.04
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y taskd
CMD taskd server
@artbikes
artbikes / hist.zsh
Created April 30, 2019 14:44
The history I really want
hist () {
if [ "$#" -gt 0 ]; then
target="$@"
history | grep "${target}" | tail
else
history | tail
fi
}
-- Tit Petric, Monotek d.o.o., Thu 27 Oct 2016 10:43:38 AM CEST
--
-- Delete nginx cached assets with a PURGE request against an endpoint
--
local md5 = require 'md5'
function file_exists(name)
local f = io.open(name, "r")
if f~=nil then io.close(f) return true else return false end
(take 10 (repeatedly #(rand-nth (clojure.string/split-lines (slurp "banana-wordlist.txt")))))
@artbikes
artbikes / Dockerfile
Last active November 2, 2018 17:24
gnuplot $$
FROM debian:sid
RUN apt-get update -y
RUN apt-get install -y gnuplot
ENTRYPOINT ["/usr/bin/gnuplot"]
@artbikes
artbikes / game-voter.patch
Created September 9, 2018 18:06
Patching Adam Petersen's `retro-games.lisp` into `game-voter.lisp`
--- old/retro-games.lisp 2011-06-14 00:08:07.000000000 -0400
+++ new/retro-games.lisp 2011-06-14 00:07:33.000000000 -0400
@@ -1,21 +1,24 @@
(in-package :cl-user)
-(defpackage :retro-games
- (:use :cl :cl-who :hunchentoot :parenscript :elephant))
+(defpackage :game-voter
+ (:use :cl :cl-who :hunchentoot :parenscript :elephant)
+ (:import-from :css-lite :css)
@artbikes
artbikes / osx_bootstrap.sh
Created July 16, 2018 15:55 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)