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
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
bind g:ctrl;shift grid padding:5 0:4,2 1:6,2 | |
# Resize Bindings | |
bind right:alt;ctrl resize +10% +0 | |
bind left:alt;ctrl resize -10% +0 | |
bind up:alt;ctrl resize +0 -10% |
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
onerror = function(m, f, l) {console.log('begin');console.log(m); console.log(f); console.log(l); console.log('end'); return false;} | |
y = function() { $.getScript('http://turriate.com/notthere.js') } | |
y() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<a href="">link</a> | |
<input type="text" id="in"/> | |
<button>hi</button> | |
<script type="text/javascript"> |
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
EphemeralResponse.mock('google.com') do |domain| | |
domain.on('get') do |request| | |
if query = request.query[:q] | |
puts "searching for #{query}" | |
Net::HTTPSuccess.new | |
else | |
nil # pass through, raise ExternalRequest or whatever normally happens | |
end | |
end | |
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
require 'net/http' | |
s = TCPSocket.open('localhost', 44567) | |
ss = OpenSSL::SSL::SSLSocket.new s | |
ss.sync_close = true | |
puts 'connecting...' | |
p ss.connect | |
puts 'done' |
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
require 'socket' | |
require 'uri' | |
require 'net/http' | |
require 'openssl' | |
# module Net | |
# OHTTP = remove_const(:HTTP) | |
# class HTTP < OHTTP | |
# include OHTTP::ProxyDelta | |
# @is_proxy_class = true |
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 | |
# Description | |
# Starts the rails environment in a long running process that forks a test | |
# runner. The test begins running immediately as the rails environment | |
# has already been loaded. Useful when running a single spec over and over. | |
# The program will exit when a change is detected | |
# in the Gemfile, or the db, config, lib and vendor directories. | |
# |
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
def default_after_load | |
lambda do | |
if rails_with_ar? | |
if Rails.application.assets | |
%w(application.js application.css).each do |primary_asset| | |
Rails.application.assets.find_asset(primary_asset) | |
end | |
end | |
ActiveRecord::Base.remove_connection | |
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
require 'rubygems' | |
require 'bundler' | |
Bundler.setup | |
require 'rack' | |
require 'rack/test' | |
require 'benchmark' | |
class Foo | |
def self.call(env) | |
sleep 1 |
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
$ irb -r ./select_server | |
>> client.puts "hi" | |
=> nil | |
>> client.puts "bye" | |
=> nil | |
>> client.close | |
=> nil | |
>> exit |