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
#!/bin/bash | |
# /usr/local/bin/pygmentize -f rtf -O "style=friendly,fontface=Courier Bold" "$1" | pbcopy | |
# /usr/local/bin/pygmentize -l ruby -f rtf -P style=presentation -P fontface="Source Code Pro" "$1" | pbcopy | |
/usr/local/bin/pygmentize -l ruby -f rtf -O "style=friendly,fontface=Source Code Pro" "$1" | | |
# Set the font size to 36pt (that's the \fs72 - RTF font sizes work in doubles) | |
sed "s/\\\\f0/\\\\f0\\\\fs72/g" | | |
# And copy. Enjoy! |
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 'pp' | |
require 'pry' | |
require 'parser/current' | |
require 'ruby-lint' | |
require 'rake' | |
# @!attribute [r] vm | |
# @return [RubyLint::VirtualMachine] | |
class Analysis < RubyLint::Iterator | |
attr_reader :vm |
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 'parser/current' | |
require 'pp' | |
require 'rake' | |
require 'pry' | |
module SexpLisper | |
def self.parse(path) | |
code = File.read(path) | |
source_buffer = Parser::Source::Buffer.new(path, 1) |
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 'parser/current' | |
require 'pp' | |
require 'rake' | |
require 'pry' | |
require 'treemap' | |
require 'treemap/image_output' | |
module SexpLisper | |
def self.parse(path) | |
code = File.read(path) |
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 'parser/current' | |
require 'pp' | |
require 'pry' | |
require 'graph' | |
module SexpLisper | |
def self.parse(path) | |
code = File.read(path) | |
source_buffer = Parser::Source::Buffer.new(path, 1) |
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
# Rakefile generated with | |
# rails plugin new foo --mountable | |
begin | |
require 'bundler/setup' | |
rescue LoadError | |
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | |
end | |
require 'rdoc/task' |
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
# no pry in test environment but works otherwise | |
class Binding | |
def pry; nil; end | |
def remote_pry; nil; end | |
end | |
__END__ | |
for finding a bug sometimes i will try it out in the browser | |
and set breakpoints in the code and javascript console |
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
RSpec.configure do |config| | |
config.around(:each) do |example| | |
# disabled by design | |
# example.call | |
end | |
end | |
__END__ | |
if i have the above rspec config in `spec_helper.rb` and i run a test |
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
class Foo | |
attr_accessor :params | |
def initialize(params) | |
@params = params | |
end | |
def process(params) | |
puts "====> before: #{params.inspect}" | |
params.merge!(local: "modifications") |
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
// Generated by CoffeeScript 1.7.1 | |
(function() { | |
var Employee; | |
Employee = (function() { | |
function Employee() {} | |
Employee.prototype.doWork = function() { | |
return console.log("done"); | |
}; |
OlderNewer