This file contains 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
test of gist.vim |
This file contains 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 'socket' | |
Host = 'google.com' | |
Port = 80 | |
socket = TCPSocket.new( Host, Port ) | |
socket.puts "GET /" | |
socket.readlines.each do |line| | |
p line | |
end |
This file contains 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
# ~/.irbrc | |
unless IRB.conf[:LOAD_MODULES].include?('irb/completion') | |
IRB.conf[:LOAD_MODULES] << 'irb/completion' | |
end |
This file contains 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
# in order to be able to do in step definitions : | |
# webrat_session.page.should have_selector( css3_selector ) | |
module WWW | |
class Mechanize | |
class Page | |
def has_selector?( selector ) | |
not search( selector ).empty? | |
end | |
end | |
end |
This file contains 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
require 'cucumber/rake/task' | |
def foo | |
puts "foo" | |
end | |
Cucumber::Rake::Task.new( :features ) do |t| | |
foo | |
end |
This file contains 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 exists('trackloaded') | |
finish | |
endif | |
" list of autocmd events: | |
" http://www.vim.org/htmldoc/autocmd.html#autocmd-events | |
let trackfile = '/tmp/timetrack.dat' | |
let trackloaded = 1 | |
execute 'autocmd InsertEnter * call Track("begin")' |
This file contains 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
require 'spec' | |
require 'rubygems' | |
require 'webrat' | |
require "#{File.dirname(__FILE__)}/logger" | |
# default object is the session object | |
def method_missing(name, *args, &block) | |
if webrat_session.respond_to?(name) | |
webrat_session.send(name, *args, &block) |
This file contains 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($) | |
{ | |
/** | |
* Get a cookie | |
* @param string | |
* @return string | |
*/ | |
function getCookie( name ) | |
{ | |
var nameEQ = name + "="; |
This file contains 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($) | |
{ | |
/** | |
* Get a cookie | |
* @param string | |
* @return string | |
*/ | |
function getCookie( name ) | |
{ | |
var nameEQ = name + "="; |
This file contains 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
" File: tab_alternate.vim | |
" Author: Olivier El Mekki | |
" Email: [email protected] | |
" Description: script allow to switch to the last seen tab, as the screen C-a a | |
" Usage: | |
" :Tabalter - go to the last seen tab | |
if exists('tab_alternate_plugin') | |
finish | |
endif |
OlderNewer