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/php -q | |
<?php | |
include('pinch.php'); | |
$pinch = new Pinch('irc.----.com', 'Manbot', '#channel', 'password'); | |
$pinch->on('/:test ([a-z0-9 ]+)/i', function($msg, $obj){ | |
$obj->msg( $msg[1], '#capdig' ); | |
}); |
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 'cinch' | |
bot = Cinch::Bot.new do | |
configure do |c| | |
c.server = "" | |
c.channels = ["#"] | |
c.password = "" | |
c.nick = "" | |
end |
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/php | |
<?php | |
$file = false; | |
$defaults = array( | |
'maxQueryTime' => pow(2,32), | |
'minQueryTime' => 0, | |
'maxLockTime' => pow(2,32), | |
'minLockTime' => 0, | |
'maxRowsSent' => pow(2,32), | |
'minRowsSent' => 0, |
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/php -q | |
<?php | |
if(isset($argv[1]) && strlen($argv[1])) { | |
$file = $argv[1]; | |
}else{ | |
echo 'Please Specify a File'; | |
exit(1); | |
} |
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
<?php | |
class ColorCLI { | |
static $foreground_colors = array( | |
'bold' => '1', 'dim' => '2', | |
'black' => '0;30', 'dark_gray' => '1;30', | |
'blue' => '0;34', 'light_blue' => '1;34', | |
'green' => '0;32', 'light_green' => '1;32', | |
'cyan' => '0;36', 'light_cyan' => '1;36', |
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 php -q | |
<?php | |
/** | |
* Photo Booth Plist Rebuilder / Repair | |
* @author Jesse G. Donat <donatj@gmail.com> http://donatstudios.com | |
* @license http://opensource.org/licenses/mit-license.php | |
*/ | |
# Update this path with your username | |
$libraryPath = getenv('HOME') . '/Pictures/Photo Booth Library/'; |
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
// ==UserScript== | |
// @name Penny Arcade Line-Height Correction | |
// @author Jesse G. Donat | |
// @namespace http://donatstudios.com/ | |
// @match http://www.penny-arcade.com/* | |
// @description Fixes Penny-Arcades stupid unreadable lineheight | |
// ==/UserScript== | |
document.getElementsByClassName('body')[0].style.lineHeight='1.6em'; |
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
Imports System.Windows.Shell | |
Class Application | |
Public Sub New() | |
Dim jl As New JumpList | |
JumpList.SetJumpList(Application.Current, jl) | |
Dim SaveAs As New JumpTask | |
SaveAs.ApplicationPath = System.Reflection.Assembly.GetExecutingAssembly.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
#!/usr/bin/php -q | |
<?php | |
$handle = @fopen("B-large-practice.in", "r"); | |
$count = fgets($handle); | |
for( $i = 1; $i <= $count; $i++ ) { | |
echo 'Case #' . $i . ': ' . implode(' ', array_reverse(explode(' ', trim(fgets($handle)))) ) . PHP_EOL; | |
} |
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
/** | |
* Method for taking a string formatted as a css selector and breaking it down into id/classes/attributes/in-line styles | |
* to use in the creatin of an element. I.E. "#id.class.class2[attribute=value]{ border: 1px solid blue; }" | |
* | |
* @ignore this is the original regex i wrote, which was awesome, but broke on some edge cases ... | |
* "!(\#(.+?)(\.|\[|\{)){1,}!" => ' id="$2" $3', //ID | |
* "!(\.(.*?)(\[|\{)){1,}!" => ' class="$2" $3', //CLASS | |
* "!\[(.*?)=([^\[]*)\]!" => ' $1="$2" ', //ATTRS | |
* "!\{(.*)\}!" => ' style="$1" ', //INLINE STYLE | |
* "!\.([a-zA-Z_]+[\w\-]*)!" => ' $1', //SPECIFIC CLASSES |