Skip to content

Instantly share code, notes, and snippets.

View ConradIrwin's full-sized avatar

Conrad Irwin ConradIrwin

View GitHub Profile
58878:/0/project1[master].$ git cherry-pick t^
fatal: empty commit set passed
58879:/0/project1[master].$ git cherry-pick t~1
[master 2582adf] Use generalised date equality
1 files changed, 5 insertions(+), 7 deletions(-)
61025:/0/ruby/pry[master].$ gem install method_source
[/home/conrad/.rvm/gems/rbx-master@global/specifications/rake-0.8.7.gemspec] isn't a Gem::Specification (NilClass instead).
[/home/conrad/.rvm/gems/rbx-master/specifications/rake-0.8.7.gemspec] isn't a Gem::Specification (NilClass instead).
[/home/conrad/.rvm/gems/rbx-master@global/specifications/rake-0.8.7.gemspec] isn't a Gem::Specification (NilClass instead).
[/home/conrad/.rvm/gems/rbx-master/specifications/rake-0.8.7.gemspec] isn't a Gem::Specification (NilClass instead).
Fetching: sexp_processor-3.0.6.gem (100%)
Fetching: ruby_parser-2.2.0.gem (100%)
Fetching: method_source-0.6.0.gem (100%)
Successfully installed sexp_processor-3.0.6
Successfully installed ruby_parser-2.2.0
(in /0/ruby/pry)
Pry::InputCompleter
- should not crash if there's a Module that has a symbolic name.
Ruby Version 1.8.7
Testing Pry 0.9.4pre1
With method_source version 0.6.0
--
Pry
Pry.binding_for
import json
from jsonpath import jsonpath
import argparse
import sys
import os
def main(args):
input = [json.loads(line) for line in args.input.readlines()] if args.multiline else json.load(args.input)
commit df812e1dfc4ea949f4a2c7467dd4924bf457fe72
Author: Conrad Irwin <[email protected]>
Date: Sat Sep 10 23:27:15 2011 -0700
Add a less hacky version for ree-1.8.7
diff --git a/lib/method_source/source_location.rb b/lib/method_source/source_location.rb
index 5010520..42dd99a 100644
--- a/lib/method_source/source_location.rb
+++ b/lib/method_source/source_location.rb
Pry.config.prompt = Pry::DEFAULT_PROMPT.map do |_super|
proc { |a,b,pry|
format "%2i:%s", pry.input_array.size, _super[a,b,pry]
}
end
ls
Tweak display of methods with:
-m show only public methods
-p show public/protected/private methods (i.e. -p implies -m)
-M show only public instance methods
module LS
class Top; def self.foo; puts "Top"; end end
class Next < Top; def self.foo; puts "Next"; super; end end
module M; def foo; puts "M"; super; end end
module N; include M; def foo; puts "N"; super; end end
module O; include M; def foo; puts "O"; super; end end
module P; def foo; puts "P"; super; end end
import inspect
import code
import re
import editor
import tokenize
import linecache
import shutil
import time
import functools
#!/bin/bash -e
# Removes whitespace errors (as configued by core.whitespace) from both the working
# tree and the index.
# Goes to some lengths to avoid problems that could be caused by applying two mechanically
# altered patches in sequence.
to_work=`tempfile`
to_index=`tempfile`
# take a diff from HEAD to the working tree.