Skip to content

Instantly share code, notes, and snippets.

View homelinen's full-sized avatar

Calum Gilchrist homelinen

View GitHub Profile
:hierarchy:
- cfstack/%{cloudformation_stack}/outputs
- cfstack/%{cloudformation_stack}/resources/%{cloudformation_resource_id}
- '%{environment}/hieradata/%{clientcert}'
- '%{environment}/hieradata/autoscaling/%{autoscaling_group_name}'
- '%{environment}/hieradata/autoscaling/%{autoscaling_basename}'
- '%{environment}/hieradata/availability-zones/%{environment}/%{ec2_placement_availability_zone}'
- '%{environment}/hieradata/os/%{::osfamily}/%{::operatingsystem}/%{::operatingsystemrelease}/%{environment}'
- '%{environment}/hieradata/os/%{::osfamily}/%{::operatingsystem}/%{::operatingsystemrelease}/%{ec2_tag_environment}'
- '%{environment}/hieradata/os/%{::osfamily}/%{::operatingsystem}/%{::operatingsystemrelease}'
# This is a slightly modified .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

Keybase proof

I hereby claim:

  • I am homelinen on github.
  • I am homelinen (https://keybase.io/homelinen) on keybase.
  • I have a public key whose fingerprint is 9891 216E 9A5D C7A8 8F17 EF80 EE14 8ECE 6128 57BC

To claim this, I am signing this object:

$ ./bin/npme.js start
sh: 1: ./node_modules/.bin/ndm: not found
npmE is now running (curl http://localhost:8080).
$ ./node_modules/.bin/ndm
Deploy service daemons directly from npm packages
Usage:
ndm install ask user about environment variables and install service.
...
@homelinen
homelinen / gist:aa0555f1fafc49928137
Last active August 29, 2015 14:12
Testing enum as a replacement for tuple primitives.
#!/usr/bin/env python
from enum import Enum
from time import time
class Fruit(Enum):
bannana = (0, 1)
apple = (1, 1)
@homelinen
homelinen / gist:04dfc4fdebb8433198a6
Created December 24, 2014 12:56
Top 10 Shell Commands in history
Generated from: http://www.smallmeans.com/notes/shell-history/
git 2946 ############################################################
vim 1148 ########################
ssh 753 ################
ack 528 ###########
cd 427 #########
ls 338 #######
aws 266 ######
brew 189 ####
dig 186 ####
@homelinen
homelinen / znc_rotate.sh
Last active December 30, 2015 10:29
My rotation script for bouncer files
#!/bin/bash
# Clear up log files for ZNC IRC Bouncer
#
# Author: Calum Gilchrist
ZNC_HOME="/home/homelinen/.znc/"
# Remove logs older than 30 days
find $ZNC_HOME -mtime +30 -type f -name "*.log" -exec rm -v {} +
#!/bin/bash
#
# Implementation of a Known Plaintext Attack
#
# Author: Calum Gilchrist
# email: [email protected]
tmp_file=temp-$RANDOM.txt
if [[ ! $# -eq 2 ]]; then
@homelinen
homelinen / chinese-whispers.rb
Created July 21, 2013 22:38
Simple Implementation of Chinese Whispers. Supports varying iterations and percent change.
# Chinese Whispers
#
# author: Calum Gilchrist
#
# Experiment to distort a string based on the number of nodes between the
# sender and recipient
#
require 'raspell'
require 'optparse'
@homelinen
homelinen / fair-and-square.rb
Created April 13, 2013 16:03
Ruby implementation for Part C of the Google Code Jam 2013
#!/usr/bin/env ruby
def is_palindrome?(num)
num == num.to_s.reverse.to_i
end
def is_square_of_palindrome?(num)
root = Math.sqrt(num)