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
site :opscode | |
cookbook 'ntp' |
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
#!/bin/sh | |
rm -rf * | |
mv .git/config /tmp/git_config | |
rm -rf .git | |
git init | |
mv -f /tmp/git_config .git/config | |
touch .gitignore | |
git add . | |
git commit -m "Code cleanup" | |
git push -f |
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
import socket | |
import sys | |
host = sys.argv[1] | |
port = int(sys.argv[2]) | |
sock = socket.socket() | |
sock.connect((host,port)) | |
print sock.recv(4096) | |
sock.close |
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
# (1) copy the newrelic rpm java client into #{RAILS_ROOT}/solr/newrelic | |
# (2) add a newrelic.yml in that directory with you API key | |
# (3) add this monkey patch in an initializer to load newrelic with the solr server | |
Sunspot::Rails::Server.class_eval do | |
def run | |
command = ['java'] | |
command << "-Xms#{min_memory}" if min_memory | |
command << "-Xmx#{max_memory}" if max_memory | |
command << "-Djetty.port=#{port}" if port | |
command << "-Dsolr.data.dir=#{solr_data_dir}" if solr_data_dir |
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 generate an OpenSSH config file from a Chef search | |
# From Harvest. www.getharvest.com | |
# | |
# Source: https://github.com/harvesthq/knife-plugins | |
# | |
# See http://wiki.opscode.com/display/chef/Knife+Plugins | |
# See http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&sektion=5 | |
# | |
## Install | |
# Place in .chef/plugins/knife/sshgen.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
export PS1="\[\e[36;1m\]\u@\[\e[32;1m\]`cat /etc/chef/client.rb | grep node_name |sed 's/node_name "\(.*\)\"/\1/'` \w\a\e[32;1m\]> \[\e[0m\]" |
NewerOlder