View gist:371319
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://0to255.com/d862cb.js?variable=myColors"/> | |
<script type="text/javascript"> | |
for (i=0; i< myColors.colors.length,i++) { | |
document.write("<div style='background-color:" + myColors.colors[i] + ";height:20px;'></div>"); | |
} | |
</script> |
View CIJabber.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
if ARGV.size < 1 || ARGV.size > 2 | |
puts "Usage: #{__FILE__} PATH_TO_PROJECT [CIJOE_URL]" | |
exit 1 | |
end | |
############################## | |
JABBER_USERNAME = "example@gmail.com" | |
JABBER_PASSWORD = "secret" |
View Capfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
################################## | |
# Edit these | |
set :application, "example_node_app" | |
set :node_file, "hello_world.js" | |
set :host, "ec2-174-129-114-66.compute-1.amazonaws.com" | |
ssh_options[:keys] = [File.join(ENV["HOME"], ".ec2", "default.pem")] | |
set :repository, "git://gist.github.com/479007.git" | |
set :branch, "master" |
View active_mq_heartbeat_munin_plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'stomp' | |
################################ | |
# Config | |
stage = "dev" | |
host = "example.com" |
View tmp_no_conflict_jquery.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="plugin_functions-Type" plugin_functions="text/html; charset=utf-8"> | |
<title>jQuery noConflict() for third-party-widgets</title> | |
<!-- Date: 2010-09-12 --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/JavaScript"></script> | |
</head> |
View gist:742862
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ec2-174-129-105-XXX:/usr/local/aws/bin# ec2_get_option_query_env list-virtualhosts | |
<?xml version="1.0"?> | |
<response><vhosts><vhost hostname="assets3.XXXinc.com" https="0" type="apache"><raw><![CDATA[0]]></raw></vhost></vhosts></response> |
View crontab_entry.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nicks-MacBook-Pro:viewer nstielau$ crontab -l | |
*/5 * * * * /path/to/send_metric_to_mongolab.sh |
View Mongoid::Processable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Mongoid | |
module Processable | |
extend ActiveSupport::Concern | |
included do | |
@action = :process | |
@timeout = 60 | |
@query = {} | |
field :processable, :type => Hash, :default => {:processable => {:locked_by => nil, :locked_at => nil, :last_error => nil}} | |
end |
View set_environment.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Knife plugin to set node environment | |
# See http://wiki.opscode.com/display/chef/Environments | |
# | |
## Install | |
# Place in .chef/plugins/knife/set_environment.rb | |
# | |
## Usage | |
# Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node set_environment mynode.net my_env | |
# Looking for mynode.net | |
# Setting environment to my_env |
View Bash example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node log nstielau_vagrantup.com | |
Time Recipe Action Resource Type Resource | |
Tue May 10 10:25:20 -0700 2011 nginx::source create template proxy.conf | |
Tue May 10 10:25:20 -0700 2011 nginx::source enable service nginx | |
Tue May 10 09:50:42 -0700 2011 nginx::source create template /etc/init.d/nginx |
OlderNewer