This file contains hidden or 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/local/bin/ruby | |
require "socket" | |
irc = TCPSocket.open('irc.freenode.net', 6667) | |
irc.send("USER blah blah blah :blah blah\n", 0) | |
irc.send("NICK ChanScanBot\n", 0) | |
irc.send("JOIN #sproutcore\n", 0) | |
names = [] |
This file contains hidden or 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 | |
# phpinfo-mine | |
# Finds and retrieves phpinfo() pages from Google results. | |
# | |
# Requires WhatWeb and gggooglescan in the current working directory. | |
# | |
# It is highly recommended that you change your passwords if your servers' | |
# passwords appears in this list. | |
## | |
# Google Results as at 2011-01-21 # |
This file contains hidden or 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
// get the average color of two hex colors. | |
function avgcolor(color1,color2){ | |
var avg = function(a,b){ return (a+b)/2; }, | |
t16 = function(c){ return parseInt((''+c).replace('#',''),16) }, | |
hex = function(c){ return (c>>0).toString(16) }, | |
hex1 = t16(color1), | |
hex2 = t16(color2), | |
r = function(hex){ return hex >> 16 & 0xFF}, | |
g = function(hex){ return hex >> 8 & 0xFF}, | |
b = function(hex){ return hex & 0xFF}, |
This file contains hidden or 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
; Just drop this in /etc/couchdb/local.d/ and then | |
; start CouchDB normally. | |
; Here couch_node can be anything as long as it's uniq. | |
[os_daemons] | |
couch_node = /Users/davisp/tmp/couch-node.js | |
This file contains hidden or 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
<?php | |
echo "Prepping CSS and JS for deploy...\n"; | |
$css_files['app'] = array('reset', '960', 'screen', 'jquery.tagsinput', 'jquery.autocomplete', 'tipsy', 'prettify'); | |
//$css_files['splash'] = array('reset', 'splash'); | |
//$css_files['iphone'] = array('reset', 'screen', 'iphone'); | |
$js_files['app'] = array('jquery.autocomplete.min', 'jquery.tagsinput', 'jquery.scrollTo-1.4.2-min', 'forrst', | |
'jquery.tipsy', 'jquery.autoresize.min', 'prettify', |
This file contains hidden or 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 supportedMimeTypes = ['video/mp4', 'video/x-ms-wmv']; | |
var supportedVideoExtensions = ['.mp4', '.wmv', '.mp4v', '.m4v']; | |
var getSupportedMediaSource = function(videoElement) | |
{ | |
// If the video element source is supported, then we replace the tag. | |
if (videoElement.src | |
&& isWMPSupported(videoElement)) | |
{ |
This file contains hidden or 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 supportedMimeTypes = ['video/mp4', 'video/x-ms-wmv']; | |
var supportedVideoExtensions = ['.mp4', '.wmv', '.mp4v', '.m4v']; | |
var getSupportedMediaSource = function(videoElement) | |
{ | |
// If the video element source is supported, then we replace the tag. | |
if (videoElement.src | |
&& isWMPSupported(videoElement)) | |
{ |
This file contains hidden or 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
/*! | |
* jQuery htmlDoc "fixer" - v0.2pre - 12/15/2010 | |
* http://benalman.com/projects/jquery-misc-plugins/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
(function($){ |
This file contains hidden or 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>Dojo x-domain Skeleton</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"></script> | |
<script> | |
// the superclass | |
dojo.declare("Foo", null, { | |
bar:function(){ |
This file contains hidden or 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 domReady(callback) { | |
var domLoaded; | |
var called; | |
var onReadyStateChange = function () { | |
if (document.readyState == 'complete') { | |
domLoaded(); | |
} | |
}; |