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
root@tara:~/tmp/1008583# locate images_controller.rb | |
/usr/lib/ruby/gems/1.8/gems/refinerycms-images-0.9.9.21/app/controllers/admin/images_controller.rb | |
root@tara:~/tmp/1008583# vim `locate images_controller.rb` |
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 | |
/** | |
* A really simple memcache implementation for PHP - Based on https://gist.github.com/949850 | |
* Run the script, it listens on port 8000 | |
* To store a value, http://localhost:8000/write/family/key/val | |
* To read a value , http://localhost:8000/read/family/key | |
* | |
* This is just a proof of concept .. it doesn't handle errors etc.. | |
* |
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
require 'mkmf' | |
dir_config('string'); | |
create_makefile('string'); | |
~ |
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
"pathogen is a plugin manager | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
"save my position / view next time ai load the file | |
au BufWinLeave * mkview | |
au BufWinEnter * silent loadview | |
"highlight column/linee | |
if &bg == 'dark' |
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
/* | |
Facebook Comment Layer | |
Adds a facebook comment feed to any page | |
*/ | |
(function() { | |
//adapted from jQuerify bookmarklet loader | |
//http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet |
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
require 'metahash' | |
# Writing to a file | |
mh = Metahash::Metahash.new "path/to/beiber.mp3" | |
mh["id3:artist"] = "Dave Meowtthews" | |
# Reading the metadata | |
mh = Metahash::Metahash.new "path/to/beiber.mp3" | |
puts mh.to_h |
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
require 'benchmark' | |
task :benchmark => :environment do | |
stores = { | |
:file_store=>[Rails.root+"/tmp/cache"], | |
:mem_cache_store=>["localhost"], | |
:dalli_store=>["localhost"], | |
:redis_store=> [], | |
:mongo_store=> [], | |
} |
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
with ({$: jQuery.noConflict()}) { | |
console.log("Check me out", $); | |
} | |
console.log($); |
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
YAHOO.myProject.myModule = function () { | |
//"private" variables: | |
var myPrivateVar = "I can be accessed only from within YAHOO.myProject.myModule."; | |
//"private" method: | |
var myPrivateMethod = function () { | |
YAHOO.log("I can be accessed only from within YAHOO.myProject.myModule"); | |
} |
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 Application=(function($,_) { | |
}(jQuery.noConflict(), _.noConflict()); |
OlderNewer