Skip to content

Instantly share code, notes, and snippets.

View NeilHanlon's full-sized avatar

Neil Hanlon NeilHanlon

View GitHub Profile
RewriteEngine on
RewriteBase /clients/israelandmenew/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php?|css|media|js|phpmyadmin|images|style|user_guide|robots\.txt|assets)
RewriteRule ^(.*)$ index\.php?/$1 [L]
@NeilHanlon
NeilHanlon / gist:1522769
Created December 27, 2011 05:09
SiriProxy Error
neil@labs:~/siriproxy/SiriProxy$ rake install --trace
** Invoke install (first_time)
** Execute install
siriproxy 0.3.0 built to pkg/siriproxy-0.3.0.gem
rake aborted!
Couldn't install gem, run `gem install /home/neil/siriproxy/SiriProxy/pkg/siriproxy-0.3.0.gem' for more detailed output
/home/neil/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/gem_helper.rb:57:in `install_gem'
/home/neil/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/gem_helper.rb:33:in `block in install'
/home/neil/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/neil/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
@NeilHanlon
NeilHanlon / gist:1528053
Created December 28, 2011 14:09
SiriProxy runtime error
git://github.com/chendo/cora.git (at master) is not checked out. Please run `bundle install`
@NeilHanlon
NeilHanlon / Calculator.java
Created January 16, 2012 16:03
Calculator.java
/*
* @name Calculator.java
*
* Created on Jan 13, 2012, 5:03:48 PM
*/
package plugins;
$("table tbody tr").each(function(){
console.log('test');
$(this).click(function(){
console.log('isthisthingon?');
var url = '<?=site_url('find/edit/')?>' + '/' + $(this).attr('data');
window.location = url;
});
});
@NeilHanlon
NeilHanlon / gist:3395904
Created August 19, 2012 16:23
Neednumbers.me vcf error
BEGIN:VCARD
VERSION:3.0
CLASS:
REV:2012-08-19 09:12:42
FN:Steve Ballmer
N:Ballmer;Steve;;;
TEL;TYPE=cell,voice:(555) 555-5555
END:VCARD
BEGIN:VCARD
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: application/libraries/ctct_php_library (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
@NeilHanlon
NeilHanlon / gist:4151208
Created November 26, 2012 22:55
Loop Counter (http://imgur.com/gallery/SZb4B) PATCH aeb548a
....
for($i=0;$i<count($peopleToBlame->count());$i++){
if($peopleToBlame->canBlame()){
continue;
} elseif($i>5) {
$person::fire();
}
}
document.body.innerHTML = document.body.innerHTML.toString().match(/\[\"OrderedFriendsListInitialData\"\,\[\]\,\{\"list\"\:\[\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"/g)[0].replace(/\[\"OrderedFriendsListInitialData\"\,\[\]\,\{\"list\"\:\[\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"/g,'<a href="http://facebook.com/$1">$1</a><br><a href="http://facebook.com/$2">$2</a><br><a href="http://facebook.com/$3">$3</a><br><a href="http://facebook.com/$4">$4</a><br><a href="http://facebook.com/$5">$5</a><br><a href="http://facebook.com/$6">$6</a><br><a href="http://facebook.com/$7">$7</a><br><a href="http://facebook.com/$8">$8</a><br><a href="http://facebook.com/$9">$9</a><br><a href="http://facebook.com/$10">$10</a><br>');
╭─<root@ubuntu>-</var/www/sdbeta>-<1:23AM>-◇
╰─➤ ls -l
total 17
drwxr-xr-x 3 root root 1024 Dec 2 00:50 conf
drwxr-xr-x 4 root root 1024 Dec 2 00:50 controller
-rwxr-xr-x 1 root root 3773 Dec 2 00:51 index.php
-rwxr-xr-x 1 root root 3730 Dec 2 00:51 index.php~
drwxr-xr-x 4 root root 1024 Dec 2 00:51 less
drwxr-xr-x 5 root root 1024 Dec 2 00:51 libs
drwxr-xr-x 4 root root 1024 Dec 2 00:50 model