Skip to content

Instantly share code, notes, and snippets.

Avatar

Bob Saska r35krag0th

View GitHub Profile
View setup_aws_enhanced_networking.sh
#!/bin/bash
# One-Line-ify It: wget -O- https://goo.gl/jblmAa | sudo bash -
show_aws_post_setup_commands() {
InstanceId=$(wget -qO- http://169.254.169.254/latest/meta-data/instance-id)
RegionName=$(wget -qO- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(us-\(west\|east\)-[0-9]\)[a-z]/\1/g')
cat <<MOO
@scalp42
scalp42 / check_resource.rb
Created Nov 22, 2013
Figure if a resource exists or not in Chef before notifying it
View check_resource.rb
resource_not_found = {}
begin
resources('ruby_block[my-resource-supposed-to-exist]')
rescue Chef::Exceptions::ResourceNotFound
resource_not_found['ruby_block[my-resource-supposed-to-exist]'] = true
end
template '/etc/my/template.conf' do
source 'template.conf.erb'
mode '640'
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Mar 2, 2021
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@bkimble
bkimble / gist:1365005
Last active Feb 8, 2021
List local memcached keys using Ruby
View gist:1365005
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []