Skip to content

Instantly share code, notes, and snippets.

@jtslear
jtslear / gist:6041001
Created July 19, 2013 17:45
What is the proper format?
class something {
package { [ "unzip", "python-paramiko", "python-jinja2", "PyYAML", "zlib", "
zlib-devel" ]:
ensure => "latest"
}
}
# Converted to:
class something {
@jtslear
jtslear / gist:6373146
Created August 29, 2013 00:55
Example of a failed resource order declarations.
class play {
class { "apt":
always_apt_update => true,
before => Class["mysql"],
}
class { "mysql":
require => Class["apt"],
}
@jtslear
jtslear / gist:6385030
Created August 30, 2013 00:29
Example of working resource order.
class play {
stage { 'first':
before => Stage["main"],
}
class { "apt":
stage => first,
}
@jtslear
jtslear / wut wut
Last active December 23, 2015 20:59
So, github is a site dedicated to allowing people to
share code amoungst others and collaborate on projects.
This includes both simple scripts to complicated
applications. It's based around using an application
called git which does version control with programs.
It's kewl stuff. My attempts at programing
things: http://github.com/jtslear
I work with a group of developers who make
this application:
@jtslear
jtslear / quick dirt openshift
Created February 13, 2014 01:53
Quick and dirty getting opeshift running
scp oo.pp username@<PUBLICIPADDRESS>:
ssh username@<PUBLICIPADDRESS>
vi /etc/selinux/config
# set SELINUX=enforcing
# save and quit the file
touch /.autorelabel
reboot
ssh username@<PUBLICIPADDRESS>
yum install git vim puppet
@jtslear
jtslear / tmate.conf
Created October 5, 2014 20:32
tmate upstart
description "Starts the tmate service"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
console log
@jtslear
jtslear / secret_test_web_app.rb
Created May 29, 2015 02:49
secret_test_web_app.rb
dev_mode = node[:dev_mode]
if dev_mode
chef_gem 'sinatra'
cookbook_file '/etc/init.d/test-web-app' do
mode '0755'
source 'test-web-app'
end
@jtslear
jtslear / test-web-app.rb
Created May 29, 2015 03:28
test-web-app.rb
require 'sinatra'
set :port, ARGV[1]
get '/something1/something2/get' do
"reached via something1/something2/get"
end
get '/replaced/get' do
"reached via replaced/get"
@jtslear
jtslear / output.log
Last active November 4, 2016 12:37
AWS Lambda Memory Behavior during Container Freeze
serverless-freezing-demonstration % serverless invoke -f test -s dev -l
null
--------------------------------------------------------------------
START RequestId: 778bcf95-a285-11e6-aa5a Version: $LATEST
2016-11-04 07:54:40.248 778bcf95-a285-11e6-aa5a Array A: [ 'A' ]
2016-11-04 07:54:40.284 778bcf95-a285-11e6-aa5a Array B: [ 'B' ]
2016-11-04 07:54:40.284 778bcf95-a285-11e6-aa5a Array C: [ 'C' ]
2016-11-04 07:54:40.284 778bcf95-a285-11e6-aa5a Array D: [ 'D' ]
END RequestId: 778bcf95-a285-11e6-aa5a
REPORT RequestId: 778bcf95-a285-11e6-aa5a Duration: 37.54 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 14 MB
@jtslear
jtslear / handler.js
Created November 4, 2016 12:38
AWS Lambda Memory Behavior
'use strict';
var arrayA = [];
var arrayB = [];
module.exports.test = (event, context, callback) => {
var arrayC = [];
var arrayD = [];
arrayA.push("A");