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
(defun revert-all-buffers () | |
"Refreshes all open buffers from their respective files" | |
(interactive) | |
(let* ((list (buffer-list)) | |
(buffer (car list))) | |
(while buffer | |
(when (buffer-file-name buffer) | |
(set-buffer buffer) | |
(revert-buffer t t t)) | |
(setq list (cdr list)) |
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
→ curl -o vienna.rb https://gist.github.com/pxlpnk/5257111/raw/a577da6be4807daa4b4a2751659d100f7d1ba9f6/vienna.rb | |
→ irb -r "./vienna.rb" | |
>> v = Vienna.new | |
=> The next vienna.rb takes place at sektor5 Siebenbrunnengasse 44, 1050 Wien and starts at 2013-04-12 18:00:00 +0100. For more see: http://vienna-rb.at/blog/2013/03/19/second-meetup-to-take-place-at-co-working-space-sektor5/ | |
>> v.where? | |
=> #<struct Struct::Location name="sektor5", address="Siebenbrunnengasse 44, 1050 Wien", details=nil> |
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
(custom-set-faces | |
'(font-lock-comment-face ((t (:height 0.8))))) |
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
ruby -rwebrick -e"s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start" |
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
~❯ ls -lah | |
total 8.0K | |
drwxr-xr-x 4 at 136 Oct 16 15:26 . | |
drwxr-xr-x 16 at 544 Oct 16 15:22 .. | |
-rw-r--r-- 1 at 86 Oct 16 15:26 luke.rb | |
lrwxr-xr-x 1 at 7 Oct 16 15:26 yoda.rb -> luke.rb | |
~❯ cat luke.rb | |
p [__FILE__, $0] | |
if __FILE__ == $0 | |
puts '__FILE__ == $0' |
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
abstract_type (0.0.6) | |
actionmailer (4.0.0, 3.2.13) | |
actionpack (4.0.0, 3.2.13) | |
activemodel (4.0.0, 3.2.13) | |
activerecord (4.0.0, 3.2.13) | |
activerecord-deprecated_finders (1.0.3) | |
activerecord-import (0.3.1) | |
activerecord-postgresql-adapter (0.0.1) | |
activeresource (3.2.13) | |
activesupport (4.0.0, 3.2.13) |
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
{ | |
:key1 => { | |
:key3 => { | |
:not_always_there => 'yay' | |
}, | |
}, | |
:key2 => { | |
:key3 => "yolo" | |
} | |
} |
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
# cheap mans xpath matcher | |
# inspired by: https://gist.github.com/faun/4279964 | |
RSpec::Matchers.define :have_xml do |xpath, text| | |
match do |body| | |
doc = REXML::Document.new(body) | |
nodes = REXML::XPath.match(doc, xpath) | |
if text | |
nodes.each do |node| | |
node.content.should == text | |
end |
OlderNewer