Skip to content

Instantly share code, notes, and snippets.

View sunaku's full-sized avatar

Suraj N. Kurapati sunaku

View GitHub Profile
@ahx
ahx / integration_test.rb
Created November 12, 2010 16:21
gaming_test.rb
# Example of how you can to use Capybara with plain Rails' integration tests and FactoryGirl (or plain MyModel.create…)
require 'test_helper'
require 'capybara'
require 'capybara/dsl'
require 'database_cleaner'
Capybara.app = Pardy::Application
Capybara.default_driver = :rack_test
DatabaseCleaner.strategy = :truncation
@weakish
weakish / README.markdown
Created February 3, 2011 15:33
warn about #weasel words in #writing
@andyl
andyl / ctags_vim_paths_gemfile.rb
Created February 18, 2011 19:08
Generates Ctags and Vim Paths from Gemfile.lock
#!/usr/bin/ruby
require 'rubygems'
require 'bundler'
=begin
This script was written to incorporate Bundler and Gemfile.lock into
Vim's tag and file-finding tools.
=end
# This code generates ctags. If a Gemfile.lock is found
@sethbro
sethbro / test_helper.rb
Created January 13, 2012 18:19
MiniTest::Spec with Rails setup
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/autorun'
require 'minitest/pride'
require 'capybara/rails'
class MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
@richo
richo / openbox_divvy.xml
Created February 29, 2012 22:03
Bindings to make window management simple in openbox
<keybind key="W-Escape">
<keybind key="q">
<action name="Close"/>
</keybind>
<!-- Keybindings for resizing, ala divvy -->
<!-- 30% -->
<keybind key="C-h">
<action name="MoveResizeTo">
<x>0</x>
<height>98%</height>
@ssokolow
ssokolow / .htaccess
Created April 1, 2012 04:59
Redirecting when the old URL may or may not support .htaccess
# The proper way to HTTP Redirect... but not all hosts listen to .htaccess (eg. GitHub Pages)
# Some hosts also provide a special redirect option in their hosting controls.
RedirectPermanent / http://www.newsite.com/
# Probably never used, but just to be thorough.
ErrorDocument 404 /404.html
@matthewlmcclure
matthewlmcclure / less.diff
Created June 19, 2013 19:57
Add incremental search to less. 2013-06-19-02
===================================================================
RCS file: RCS/command.c,v
retrieving revision 1.92
diff -u -r1.92 command.c
--- command.c 2012/07/03 20:10:42 1.92
+++ command.c 2013/06/19 19:37:59
@@ -47,6 +47,8 @@
extern int shift_count;
extern int oldbot;
extern int forw_prompt;
@NonLogicalDev
NonLogicalDev / prefs.js
Last active December 20, 2015 09:59 — forked from johnbender/prefs.js
// Use this for nOtch2k
term_.prefs_.set('background-color', "#202020");
term_.prefs_.set('foreground-color', "#a0a0a0");
term_.prefs_.set('color-palette-overrides', [
'#383838',
'#a95551',
'#606060',
'#a98051',
'#657d3e',
@jake284773
jake284773 / README.md
Last active April 20, 2018 05:29
Monokai Colour Scheme for Chrome Secure Shell.

Monokai Colour Scheme for Chrome Secure Shell

To apply this colour scheme, paste the prefs.js file into the JavaScript Console.

@ilpeste
ilpeste / changes.sh
Created October 25, 2011 10:50
Errors while installing ruby-oci8 on Ubuntu 11.10
# Natty (Ubuntu 11.04)
$ dpkg -L libc6-dev | grep /types.h
/usr/include/bits/types.h
/usr/include/rpc/types.h
/usr/include/sys/types.h
# Oneiric (Ubuntu 11.10)
$ dpkg -L libc6-dev | grep /types.h