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> | |
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> |
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 | |
# Install Node.js on a Mac | |
# Requires xCode tools to be installed | |
# Install Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# Install node | |
brew install node |
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
{ | |
"name": "NPM JSON Schema", | |
"description": "Describes a package.json for an NPM (http://npmjs.org) package. type `npm help json` for more.", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"required": true | |
}, | |
"version": { |
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
info it worked if it ends with ok | |
verbose cli [ 'node', '/home/smith/.nvm/v0.4.7/bin/npm', 'link' ] | |
info using npm@1.0.6 | |
info using node@v0.4.7 | |
verbose /home/smith/.nvm/v0.4.7/bin/node node symlink | |
verbose config file /home/smith/.npmrc | |
verbose config file /home/smith/.nvm/v0.4.7/etc/npmrc | |
silly testEngine { name: 'gearman', | |
silly testEngine version: '0.3.0', | |
silly testEngine description: 'Client library for Gearman', |
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
# Commands to build a .deb with ruby 1.9.2 | |
apt-get install libssl-dev | |
gem install fpm | |
cd /usr/src | |
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz | |
tar -zxvf ruby-1.9.2-p180.tar.gz | |
cd ruby-1.9.2-p180 | |
./configure --prefix=/usr && make && make install DESTDIR=/tmp/installdir | |
cd .. | |
# This builds the package. Replace x86_64 with i386 or the arch you're building |
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> |
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
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
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
<!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> |