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
bash -c ' | |
if [ ! -f /usr/local/bin/chef-client ]; then | |
apt-get update | |
apt-get install -y patch wget build-essential libreadline5-dev zlib1g-dev libssl-dev | |
cd /usr/src | |
test -f ruby-enterprise-<%= Chef::Config[:ree_version] %>.tar.gz || wget --quiet --timestamping <%= Chef::Config[:ree_url_prefix] %>/ruby-enterprise-<%= Chef::Config[:ree_version] %>.tar.gz | |
test -d ruby-enterprise-<%= Chef::Config[:ree_version] %> || tar xfz ruby-enterprise-<%= Chef::Config[:ree_version] %>.tar.gz | |
cd ruby-enterprise-<%= Chef::Config[:ree_version] %> | |
test -f /usr/local/bin/ruby || ./installer --auto /usr/local | |
gem install ohai chef --no-rdoc --no-ri --no-update-sources <%= '--prerelease' if @config[:prerelease] %> |
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
bash -c ' | |
if [ ! -f /usr/local/bin/chef-client ]; then | |
apt-get update | |
apt-get install -y git-core curl build-essential binutils-doc gcc autoconf flex bison libreadline5-dev zlib1g-dev libssl-dev libxml2-dev libxslt1-dev | |
bash < <( curl -L http://bit.ly/rvm-install-system-wide ) | |
( | |
cat <<'EOP' | |
[[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" # This loads RVM into a shell session. | |
EOP | |
) > /etc/profile.d/rvm.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
ree_version "1.8.7-2010.02" | |
ree_url_prefix "http://rubyforge.org/frs/download.php/71096" |
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
require "rubygems" | |
require "eventmachine" | |
module EchoServer | |
def post_init | |
puts "-- someone connected to the EventMachine echo server!" | |
end | |
def receive_data data | |
send_data ">>>you sent: " + data |
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
var net = require("net"); | |
function echoServer (stream) { | |
stream.setEncoding("utf8"); | |
stream.on("connect", function () { | |
console.log("-- someone connected to the Node.js echo server!"); | |
}); | |
stream.on("data", function (data) { | |
stream.write(">>>you sent: " + data); | |
}); |
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> | |
<html> | |
<head> | |
<title>Cramer Development, Inc. - Web Development</title> | |
<meta charset="UTF-8" /> | |
<style> | |
body { width: 80%; margin: 0 auto; text-align: center; background-color: #1A1A1A; } | |
div#main { margin-top: 300px; } | |
img { border: none; } | |
</style> |
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
function wildcard_admin_redirect($location, $status = 302) { | |
$url = parse_url($location); | |
if ($url['scheme'] === 'https' && | |
(preg_match("/\/wp-[login|admin|register]/", $url['path']) > 0)) { | |
$orig = preg_replace("/^https?:\/\//", "", get_original_url($url['host'])); | |
if ($orig && $orig !== $url['host']) { | |
$location = 'https://'.$orig.$url[path]; | |
} | |
} | |
return $location; |
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
var socket = require("net").createConnection(4730, "localhost"); | |
socket.on("connect", function () { | |
console.log("connect"); | |
}); | |
socket.on("data", function (data) { | |
console.log("data: " + data); | |
}); |
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
var socket = require("net").createConnection(4730, "localhost"), | |
packet = require("../lib/packet.js"); | |
socket.on("connect", function () { | |
console.log("connect"); | |
socket.write(req, function () { | |
console.log("write"); | |
}); | |
}); |
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> | |
<!-- Big textarea with a reset button for toddlers. Best run with iexplore -k | |
or something like that --> | |
<style>textarea { font-size: 72pt; }</style> | |
<form> | |
<textarea cols=21 rows=9></textarea> | |
<button type="reset">Start Over</button> | |
</form> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script> |