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(){ | |
//Refer http://code.google.com/apis/picasaweb/docs/2.0/reference.html | |
// Album url can be obtained by getting the rss feed of a Public or Limited album | |
var album_url = "https://picasaweb.google.com/data/feed/base/user/104873802064687726116/albumid/5710488196657525265?"+ // The base url | |
//Query Parameters | |
"alt=json"+ // Options are json and rss , | |
"&kind=photo"+ | |
"&authkey=Gv1sRgCIC0zJCjrbqplwE"+//Necessary only because the album's visibility is Limited , link only |
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 | |
// Add this to any `view` recommended is View/Layouts/default.ctp | |
/* | |
WWW_ROOT generally refers to your webroot directory | |
DS is usually '/' | |
$this->params['controller'] returns controller name in lowercase | |
$this->params['action'] returns action name in lowercase | |
Refer | |
* http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html |
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
############ GIT ################ | |
# Delete local branch | |
git branch -D <branch-name> | |
# Delete remote branch | |
git push origin :<branch-name> | |
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/zsh | |
# | |
# A shell Script to start VirtualBox VMs in Various Modes | |
# Useful when placed in ~/bin | |
# | |
type="" | |
case $2 in | |
[g|G] ) | |
type="gui" | |
;; |
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/bash | |
# | |
# Script to display an alert message once downloads complete | |
# Takes the same parameters as wget | |
# | |
wget $@ | |
wait | |
zenity --info --text="Download Complete" |
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 | |
/** | |
* This Script inserts a mongo array in the database and | |
* retrieves its id and displays it | |
*/ | |
$form=array( | |
"model"=>"DynamicFormResponse", | |
"options"=>array( | |
"type"=>"post", |
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/bash | |
/path/to/eclipse & | |
P=`which eclipse` | |
disown `pidof ${P}` |
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
$ ab -n 10000 -c 100 "http://localhost:9002/Socket/select?columnFamily=lost" | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests | |
Completed 4000 requests |
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
ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start" |