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
# How to run a generator from a plugin's install.rb | |
begin | |
# First have to load up rails | |
unless Kernel.const_defined?('RAILS_ROOT') | |
Kernel.const_set('RAILS_ROOT', File.join(File.dirname(__FILE__), '..', '..', '..')) | |
end | |
if (File.exists?(RAILS_ROOT) && File.exists?(File.join(RAILS_ROOT, 'app'))) | |
require "#{RAILS_ROOT}/config/boot" |
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
<!-- CrowdTranslator JS --> | |
<script type="text/javascript"> | |
(function() { | |
var ct = document.createElement('script'); ct.type = 'text/javascript'; ct.async = true; | |
ct.src = ('https:' == document.location.protocol ? 'https://d20z6ezet11y6s.cloudfront.net' : 'http://jscdn.crowdtranslator.com') + '/javascripts/page_translator.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ct, s); | |
})(); | |
</script> | |
<!-- End CrowdTranslator JS --> |
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 'binding_of_caller' | |
class String | |
def h | |
args = self.split(/,/).map {|a| a.strip } | |
arg_vals = args.map {|a| [a, binding.of_caller(2).eval(a)] } | |
return Hash[arg_vals] | |
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
(function(undefined) { | |
// The Opal object that is exposed globally | |
var Opal = this.Opal = {}; | |
// The actual class for BasicObject | |
var RubyBasicObject; | |
// The actual Object class | |
var RubyObject; |
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
var fsevents = require('fsevents'); | |
var watcher = fsevents('/Users/ryanstout/Sites/infinitydrive/drive'); | |
watcher.on('fsevent', function(path) { console.log(path); }); | |
watcher.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
module Logger | |
module ClassMethods | |
def __log(method_name) | |
orig_method_name = :"orig_#{method_name}" | |
alias_method orig_method_name, method_name.to_sym | |
define_method(method_name) do |*args, &block| | |
begin | |
puts "Before: #{args.inspect}" | |
5 / 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
require 'promise' | |
class PromiseRunner | |
attr_reader :promise | |
def initialize | |
@promise = Promise.new | |
end | |
def 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
2014/11/03 14:05:21 FUSE: <- Access [ID=0x8 Node=0x1 Uid=220 Gid=220 Pid=62095] mask=0x0 | |
2014/11/03 14:05:21 FUSE: -> ID=0x8 | |
2014/11/03 14:05:25 FUSE: <- Access [ID=0x9 Node=0x1 Uid=501 Gid=20 Pid=336] mask=0x0 | |
2014/11/03 14:05:25 FUSE: -> ID=0x9 | |
2014/11/03 14:05:25 FUSE: <- Getattr [ID=0xa Node=0x1 Uid=501 Gid=20 Pid=336] | |
2014/11/03 14:05:25 FUSE: -> ID=0xa Getattr {AttrValid:1s Attr:{Inode:7814970 Size:136 Blocks:0 Atime:2014-11-03 14:05:18 -0700 MST Mtime:2014-11-03 14:05:17 -0700 MST Ctime:2014-11-03 14:05:17 -0700 MST Crtime:2014-11-03 14:05:17 -0700 MST Mode:drwxrwxrwx Nlink:4 Uid:501 Gid:20 Rdev:0 Flags:0}} | |
2014/11/03 14:05:25 FUSE: <- Statfs [ID=0x7 Node=0x1 Uid=501 Gid=20 Pid=336] | |
2014/11/03 14:05:25 FUSE: -> ID=0x7 Statfs {Blocks:121837600 Bfree:17771751 Bavail:17707751 Files:121837598 Ffree:21362879 Bsize:4096 Namelen:2048 Frsize:0} | |
2014/11/03 14:05:25 FUSE: <- Access [ID=0x0 Node=0x1 Uid=501 Gid=20 Pid=336] mask=0x0 |
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
compiled, running... | |
Starting 443... | |
Mount /Users/ryanstout/Sites/infinitydrive/go/drive at /Users/ryanstout/Sites/infinitydrive/go/drivemount | |
2014/11/03 14:19:44 FUSE: <- Init [ID=0x0 Node=0x0 Uid=0 Gid=0 Pid=65567] 7.8 ra=16777216 fl=0 | |
2014/11/03 14:19:44 FUSE: -> ID=0x0 Init {MaxReadahead:0 Flags:InitBigWrites MaxWrite:131072} | |
2014/11/03 14:19:44 FUSE: <- Statfs [ID=0x0 Node=0x1 Uid=0 Gid=0 Pid=65567] | |
2014/11/03 14:19:44 FUSE: -> ID=0x0 Statfs {Blocks:121837600 Bfree:17768033 Bavail:17704033 Files:121837598 Ffree:21359161 Bsize:4096 Namelen:2048 Frsize:0} | |
2014/11/03 14:19:44 FUSE: <- Statfs [ID=0x0 Node=0x1 Uid=0 Gid=0 Pid=65567] |
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
{"volt/page/page"=>"{\"version\":3,\"file\":null,\"mappings\":\";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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