Skip to content

Instantly share code, notes, and snippets.

View jasherai's full-sized avatar

Pritesh jasherai

  • Phatforge
  • London
View GitHub Profile
CmdUtils.CreateCommand(
{
name: "ruby",
takes: {"function": noun_arb_text},
icon: "http://ruby-doc.org/favicon.ico",
homepage: "http://jackndempsey.blogspot.com",
author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"},
license: "MPL,GPL",
description: "Search ruby functions documentation",
help: "Select a ruby function",
require 'right_aws'
namespace :utils do
namespace :attachments do
task :initialize_s3 => :environment do
s3_config = YAML.load_file(File.join(File.dirname(__FILE__), '/../../config/amazon_s3.yml'))
s3_config = s3_config[RAILS_ENV].to_options
@s3 = RightAws::S3.new(s3_config[:access_key_id], s3_config[:secret_access_key])
end
const Google = 'http://google.com/',
PLang = 'extensions.ubiquity.google.lang',
PSafe = 'extensions.ubiquity.google.safe',
PSize = 'extensions.ubiquity.google.size',
{prefs} = Application,
ID = '#_'+ (Math.random() +'').slice(2),
Logo = <a class="logo" href={Google}><img border="0"
src={Google +'intl/en_ALL/images/logo.gif'} height="110"/></a>,
Base = <div class="google"><style><![CDATA[
@{position:relative; line-height:1.25}
const Google = 'http://google.com/',
PLang = 'extensions.ubiquity.google.lang',
PFrom = 'extensions.ubiquity.google.from',
PSafe = 'extensions.ubiquity.google.safe',
PSize = 'extensions.ubiquity.google.size',
{prefs} = Application,
ID = '#_'+ (Math.random() +'').slice(2),
Logo = <a class="logo" href={Google}><img border="0"
src={Google +'intl/en_ALL/images/logo.gif'} height="110"/></a>,
Base = <div class="google"><style><![CDATA[
#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
require 'chef'
require 'chef/node'
require 'chef/rest'
# Please see the readme for overview documentation.
#
@jasherai
jasherai / _README.md
Created November 23, 2009 11:05 — forked from kneath/_README.md

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
@jasherai
jasherai / build_chef_0.8
Created December 1, 2009 13:41 — forked from btm/build_chef_0.8
Chef 0.8 alpha on ec2 process
# ec2 ami-1515f67c
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb
sudo gem sources -a http://gems.opscode.com
sudo gem sources -a http://gemcutter.org # for nanite
sudo gem install cucumber merb-core nanite jeweler uuidtools json --no-ri --no-rdoc
mkdir ~/src
cd ~/src
git clone git://github.com/opscode/chef.git
Usage: ./knife-app sub-command (options)
-k, --key KEY API Client Key, defaults to OPSCODE_KEY
-c, --config CONFIG The configuration file to use
-e, --editor EDITOR Set the editor to use for interactive commands
-l, --log_level LEVEL Set the log level (debug, info, warn, error, fatal)
-L, --logfile LOGLOCATION Set the log file location, defaults to STDOUT
-u, --user USER API Client Username, defaults to OPSCODE_USER
-p, --print-after Show the data after a destructive operation
-v, --version Show chef version
-y, --yes Say yes to all prompts for confirmation
# install_chef.sh
#
# John Merrells <john@merrells.com>
logfile="/root/log.txt"
echo "-----" >> $logfile
# New sources.list
cat > /etc/apt/sources.list << EOF
deb http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted
# ...
# append following lines
Dir[ File.join(File.dirname(__FILE__), 'tasks', '*.rake') ].sort.each do |f|
load f
end