Skip to content

Instantly share code, notes, and snippets.

Ryan Gibbons rtgibbons

Block or report user

Report or block rtgibbons

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:750686
(default) 13 queries took 18 ms Nr Query Error Affected Num. rows Took (ms)
1 SHOW FULL COLUMNS FROM `cake_programs` 4 4 2
2 SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME= 'latin1_swedish_ci'; 1 1 1
3 SHOW FULL COLUMNS FROM `cake_dispensing_solutions` 8 8 5
4 SHOW FULL COLUMNS FROM `cake_patient_buildings` 9 9 2
5 SHOW FULL COLUMNS FROM `cake_practice_operations` 9 9 3
6 SHOW FULL COLUMNS FROM `cake_team_training_educations` 13 13 2
7 SHOW FULL COLUMNS FROM `cake_locations` 22 22 2
8 START TRANSACTION 0 0
9 INSERT INTO `cake_programs` (`goals`, `modified`, `created`, `id`) VALUES ('{\"year_1\":\"1,111\",\"year_2\":\"$11.11\",\"year_3\":\"3000\"}', '2010-12-21 15:44:34', '2010-12-21 15:44:34', '4d111fc2-61d4-40de-8154-0309e0943fa0') 1 1
View gist:756629
<?php
global $options;
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) {
$$value['id'] = stripslashes( $value['std'] );
} else {
$$value['id'] = stripslashes( get_settings( $value['id'] ) );
}
}
?>
View Routing Table
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 172.22.0.1 UGSc 40 0 en0
default 172.22.0.1 UGScI 0 0 en1
default 172.22.25.2 UGScI 0 0 ppp0
66.64.23.42 172.22.0.1 UGHS 0 0 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 13 2473371 lo0
169.254 link#4 UCS 0 0 en0
172.22 link#4 UCS 6 0 en0
View closure-ben-alman.js
function makeCounter() {
// `i` is only accessible inside the closure created when the
// `makeCounter` function is invoked.
var i = 0;
return function() {
console.log( ++i );
};
}
@rtgibbons
rtgibbons / balisong-gem-backports.patch
Created Mar 10, 2011
Including backports gem for ruby_18 platforms
View balisong-gem-backports.patch
diff --git a/Gemfile b/Gemfile
index ec7a4ff..e86cc9d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,6 +10,8 @@ gem 'mime-types', :require => 'mime/types'
gem 'rdiscount'
gem 'RedCloth'
+gem 'backports', :platforms => 'ruby_18'
+
View ian_h_pastie_1752790.js
Validate('#new_user', {
'username' : {
'minimum' : 5,
'maximum' : 20,
'presence' : true
},
'password' : {
'minimum' : 8,
'maximum' : 32,
'presence' : true
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Twitter</title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.tweet.js"></script>
<script type="text/javascript" src="jquery.li-scroller.js"></script>
<script>
@rtgibbons
rtgibbons / phparray.php
Created Jun 1, 2011
Simple assocaitive array
View phparray.php
<?php
var $contactTimeOptions = array(
'morning' => 'morning',
'afternoon' => 'afternoon',
'evening' => 'evening'
);
?>
@rtgibbons
rtgibbons / paulify.php
Created Jun 3, 2011
download random image
View paulify.php
<?php
$files = array();
$path = 'i/s/';
if ( $dir = opendir( $path ) ) {
while ( false !== ( $file = readdir( $dir ) ) ){
switch( mime_content_type( $path.$file ) ) {
case 'image/jpeg':
case 'image/jpg':
@rtgibbons
rtgibbons / paulify.href
Created Jun 3, 2011
pualify bookmarklet
View paulify.href
javascript:(function(){var d=document,j=d.getElementById('__paulify_nodes'),k=null;var files=['https://github.com/rtgibbons/Paulify/raw/master/js/paulify.js','https://github.com/rtgibbons/Paulify/raw/master/js/paulify_run.js'];if(j){paulify_add();}else{k=d.createElement('div');k.id='__paulify_nodes';d.getElementsByTagName('body')[0].appendChild(k);for(var l=0;l<files.length;l++){j=d.createElement('script');j.src=files[l];k.appendChild(j);}}})();
You can’t perform that action at this time.