Skip to content

Instantly share code, notes, and snippets.

require_recipe 'fog'
route53_rr node[:ec2][:instance_id] do
record_type "CNAME"
fqdn "#{node[:ec2][:instance_id]}.#{node["route53"]["domain"]}"
rdata(["#{node[:ec2][:public_hostname]}."])
accesskey node["route53"]["accesskey"]
secretkey node["route53"]["secretkey"]
zoneid node["route53"]["zoneid"]
action :update
@tankchintan
tankchintan / gist:1335220
Last active November 30, 2019 00:17
Procedure for installing and setting Sun JDK Java on Default Amazon Linux AMI
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm
# Rename the file downloaded, just to be nice
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm
# Install Java
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@ravasthi
ravasthi / _config.yml
Created February 15, 2012 08:59
Multiple authors on Jekyll
authors:
hanzou:
name: Hanzou Hattori
display_name: Hanzou
gravatar: c66919cb194f96c696c1da0c47354a6a
email: hanzou@company.com
web: http://company.com
twitter: company
github: hhattori
jorgen:
@ruckus
ruckus / gist:2293434
Created April 3, 2012 16:36
Basic setup of WAL-E for continuous archiving and recovery

WAL-E needs to be installed on all machines, masters and slaves.

How to install WAL-E

Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf is:

archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
anonymous
anonymous / gist:4374155
Created December 25, 2012 16:48
Quick and dirty way to sort pictures like picasa does via bash: # 10.8 doesnt have a recent ls, so install gnuls as gls(default name) sudo port install coreutils +with_default_names
gls -l --time-style="+%Y-%m-%d" | while read LINE; do
fdate=`echo $LINE | awk -F" " {'print $6'}`
fname=`echo $LINE | awk -F" " {'print $7'}`
echo "mkdir $fdate"; echo "mv $fname $fdate"
done | bash
@fnichol
fnichol / README.md
Last active April 27, 2023 15:24
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:

Setup

  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@bfg100k
bfg100k / snapRAID_helper.sh
Last active May 22, 2024 13:49
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) It first calls diff to figure out if the parity info is out of sync.
# 2) If parity info is out of sync, AND the number of deleted files exceed
# X (configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
# the existing parity info)
# 3) If partiy info is out of sync, AND the number of deleted files exceed X
@benorama
benorama / .travis.yml
Last active January 10, 2023 18:37
Grails AWS Elastic Beanstalk deployment script
language: groovy
jdk: oraclejdk8
sudo: false # To use new Travis docker-based infrastructure
env:
global:
# $AWS_ACCESS_KEY_ID
- secure: "..."
# $AWS_SECRET_ACCESS_KEY
- secure: "..."