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
if (CmdUtils.parserVersion == 2) { | |
CmdUtils.CreateCommand({ | |
names: ["trends", "google trends", "google search trends"], | |
icon: "http://www.google.com/favicon.ico", | |
author: {name: "Pratham Kumar", email: "[email protected]"}, | |
description: "Google Trends.", | |
homepage: "http://pratham.name/", | |
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}], | |
preview: function (html, args) { |
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
CmdUtils.CreateCommand({ | |
name: "search-domain-name", | |
icon: "http://instantdomainsearch.com/favicon.ico", | |
author: {name: "Pratham Kumar", email: "[email protected]"}, | |
description: "Checks availabilty of the domain name with com/net/org TLDs.", | |
homepage: "http://pratham.name/", | |
takes: {"example.com": noun_arb_text}, | |
preview: function (html, q) { | |
var params = {name: q.text}; |
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
if (CmdUtils.parserVersion == 2) { | |
CmdUtils.CreateCommand({ | |
names: ["traffic"], | |
icon: "http://siteanalytics.compete.com/favicon.ico", | |
author: {name: "Pratham Kumar", email: "[email protected]"}, | |
description: "Get Compete traffic statistics.", | |
homepage: "http://pratham.name/", | |
arguments: [{role: 'object', nountype: noun_arb_text, label: 'example.com'}], | |
preview: function (html, q) { |
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
const | |
Google = 'http://www.google.com/', | |
GImage = 'http://image.google.com/', | |
GVideo = 'http://video.google.com/', | |
Gmail = 'https://mail.google.com/mail/', | |
GReader = Google +'reader/', | |
GCode = Google + 'codesearch', | |
GLogos = Google +'logos/', | |
GSgFAQ = 'suggest'.link('http://labs.google.com/suggestfaq.html'), | |
PPath = 'extensions.ubiquity.google.', |
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
#RUBYISMS | |
a = b.foo | |
if a.empty? | |
a = b.bar | |
else | |
a.reverse! | |
end | |
#can be simplied a little by assigning and |
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 idioms | |
######################################## | |
#old school | |
breakfast = nil | |
if !breakfast | |
breakfast = "bacon" | |
end | |
#cool but is there a better way? | |
breakfast = "bacon" unless breakfast |
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
<% cache "time_based/explore_recent_users#{params[:page]}.#{Time.now.to_i / 600}" do -%> | |
<div id='recent_users' class='collaborations'> | |
<%= recent_users(@top_level) %> | |
</div> | |
<%= clearfix %> | |
<% end -%> |
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 | |
echo "Setting up chef..." | |
sudo apt-get -y update | |
sudo apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert | |
cd /tmp | |
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz | |
tar zxf rubygems-1.3.4.tgz |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
require 'chef' | |
require 'chef/node' | |
require 'chef/rest' | |
# Please see the readme for overview documentation. | |
# |
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
ToadMate Bookmarklet | |
Adds clickable links to open the file/line from the | |
stacktrace on Hoptoad (http://hoptoadapp.com) into TextMate. | |
INSTALL: | |
Change the lpd variable to your local project directory. | |
It relies on your project folders being named after the main part | |
of your domain name (example.com => /example/). |