Skip to content

Instantly share code, notes, and snippets.

View jasherai's full-sized avatar

Pritesh jasherai

  • Phatforge
  • London
View GitHub Profile
#!/usr/bin/env ruby
# Made by Pieter de Bie <frimmirf@gmail.com>
# Based on a "Pastie" task by someone
require "tempfile"
GIST_URL = 'http://gist.github.com/gists'
GIST_LOGIN_URL = 'https://gist.github.com/session'
USERNAME = "pieter"
TOKEN = "SweetTokenPower"
@erikvold
erikvold / gistUserScriptInstallLink.user.js
Created January 29, 2010 06:04
This userscript will add an 'Install' link to all userscript files (which end with .user.js by necessity).
<% iterations.each do |iteration| %>
<h2 id='Sprint_<%= iteration.number %>' style='display:inline'>Sprint <%= iteration.number %></h2><i> - ends <%= iteration.finish.strftime("%Y-%m-%d") %></i><a href='#Sprint_<%= iteration.number %>' class='anchor'>&nbsp;&para;</a>
<ul>
<% iteration.stories.each do |story| %>
<li class='story'><h3 style='display:inline'><i>Story <%= story.id %> (<%= story.current_state %>)</i></h3>
<small class='taskCount'><i><%= " - #{story.tasks.size} tasks defined" if story.respond_to?(:tasks) %></i></small>
<p class='storyDescription'><span class="storyIngress"><%= story.name%></span><br><span class="storyRest" style="color:grey"></span></p>
<% end %>
</ul>
<% end %>
@smichaelis
smichaelis / Gemfile
Created May 4, 2010 11:34
Steps to get Devise Authentication and CanCan Authorization running on Ruby on Rails 2.3.5 with DataMapper and Bundler on Google AppEngine
# Critical default settings:
disable_system_gems
disable_rubygems
bundle_path '.gems/bundler_gems'
# List gems to bundle here:
gem 'rails_dm_datastore'
gem 'rails', "2.3.5"
# Needed for Devise-Plugin
@mchung
mchung / Gemfile-rails-2.3.8.rb
Created May 27, 2010 21:20
Rails! Featuring Bundler, Cucumber, RVM, Postgres, on Ruby-1.8.7
# Everything you need to do to get started with Rails 2.3.8
#
# As of June 14th, 2010 @ 2:30 p.m. MST
#
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM
anonymous
anonymous / gist:456543
Created June 28, 2010 23:31
## NFS host machine (assuming OSX)
$ cat /etc/exports
# these network and mask options work with default host-only vagrant networking
# 501:20 should be the uid/gid of whoever owns the actual shared directory on the host
# so when files are created they are by the same user as if the files were created
# locally
/absolute/path/to/directory/to/share -mapall=501:20 -network 192.168.10.0 -mask 255.255.255.0
@gravis
gravis / readme
Created September 26, 2010 17:26
tcp syslog logger for rails draft
tcp_syslog is now a gem :
https://github.com/tech-angels/tcp_syslog
current_dir = File.dirname(__FILE__)
platform = "https://api.opscode.com/organizations"
require 'grit'
branch = Grit::Repo.new("#{current_dir}/..").head.name
case branch
when "internal"
url = "http://virt1test.int.example.org:4000"
validator = ""
@kennethkalmer
kennethkalmer / README
Created October 28, 2010 11:26
Sample mysql_grant provider for Chef
Prototype mysql_grant provider for Chef
---------------------------------------
Drop the two files into your mysql cookbook, and experiment with the following examples:
mysql_grant "kenneth" do
action :grant
username "root" # <- User with admin privs
password node[:mysql][:server_root_password]
# Actual grant details
require 'chef'
require 'chef/node'
class Opscode
class Backup
attr_accessor :backup_dir
def initialize(backup_dir, config_file)
@backup_dir = backup_dir
Chef::Config.from_file(config_file)