Skip to content

Instantly share code, notes, and snippets.

ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\ 💩 😜 💩"};$stdout.flush;sleep 0.1}'
altgraph==0.16.1
appdirs==1.4.3
asn1crypto==0.24.0
beautifulsoup4==4.8.0
certifi==2019.6.16
cffi==1.12.3
chardet==3.0.4
configparser==3.8.1
cryptography==2.7
cycler==0.10.0
#!/usr/bin/env python
import math
price_pro_bar = .7
price_mag = 2.5
tax = .0625
multiplier_pro_bar = 3
budget = 20
@kkenny
kkenny / hab.txt
Last active October 17, 2019 18:27
633 export HAB_AUTH_TOKEN=<redacted>
636 vi ~/.bashrc # Add auth token export to bashrc
642 hab origin key download darkstar
644 export HAB_ORIGIN=darkstar
645 git clone [email protected]:learn-chef/lcr-effortless-audit-getting-started_app.git ./effortless-audit-profile_app
646 cd effortless-audit-profile_app/
647 cd sample_profile/
649 vi habitat/plan.sh
653 cp ~/Downloads/darkstar-20191016133749.sig.key ~/.hab/cache/keys/
654 hab origin key export --type secret darkstar
@kkenny
kkenny / workout.rb
Created April 29, 2017 00:41
Randomized Workout Schedule
#!/usr/bin/env ruby
workout = [ "leg", "chest", "arm", "back", "shoulder", "core", "cardio", "rest" ].sample
sets = (2..5).to_a.sample
reps = (5..12).to_a.sample
case workout
when "leg"
exercises = [ 'Squats', 'Lunges', 'Calf Raises', 'Dead Lift', 'Rear Lunge', 'Dumbell Step-ups' ]
url = 'https://www.bodybuilding.com/content/5-leg-workouts-for-mass-a-beginners-guide.html'
source "https://rubygems.org"
gem "rake", '~>10.4.2'
gem "chef", '11.16.2'
gem "foodcritic", '~>4.0.0'
gem "highline"
gem "knife-ec2"
gem "knife-cloud"
gem "knife-openstack", '~>1.0.0'
gem "knife-inspect"
{
"name": "app_servers",
"default_attributes": {
"sudo": {
"users": [
"someone"
]
}
},
"json_class": "Chef::Role",
#!/usr/bin/env python
import argparse
import socket
import time
CARBON_SERVER = ''
CARBON_PORT = 2003
@kkenny
kkenny / chef_inventory.rb
Created June 12, 2012 20:04
Chef Inventory Script
###################################################################
# (C)opyright 2012, Kameron Kenny, ExactTarget
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Put this file in .chef/plugins/knife/
@kkenny
kkenny / knife_status_environment_plugin.rb
Created May 23, 2012 20:32
knife environment status plugin
require 'chef/knife'
require 'highline'
module Limelight
class EnvironmentStatus < Chef::Knife
deps do
require 'chef/search/query'
require 'chef/knife/search'
end