Skip to content

Instantly share code, notes, and snippets.

View vertiginous's full-sized avatar

Gordon Thiesfeld vertiginous

View GitHub Profile
We couldn’t find that file to show.
We couldn’t find that file to show.
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'vendor/lib'))
require 'yaml'
require 'pathname'
require 'fileutils'
require 'find'
require 'open-uri'
require 'rbconfig'
module Pik
class BashFile < ScriptFile
attr_accessor :file_data, :file_name, :ruby_dir
def extname
".sh"
end
# See http://www.sublimetext.com/docs/build for details
build gist.bat --simple "$File"
showWhenFinished true
workingDir $ProjectDir
~$ ruby -v
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]
~$rvm 1.8.7@new_gemset
error: Gemset 'new_gemset' does not exist, rvm gemset create 'new_gemset' first.
~$ echo $GEM_HOME
/home/gthiesfeld/.rvm/gems/ruby-1.8.7-p174@new_gemset
~$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
~$ gem install runt
C:\Users\gthiesfeld\Work\repo\insider>ruby -rubygems -e "require 'sinatra'" gaze.rb
== Sinatra/1.0 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.2.7 codename No Hup)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
C:\Users\gthiesfeld\Work\repo\rubyinstaller>rake ruby19 -t
(in C:/Users/gthiesfeld/Work/repo/rubyinstaller)
Loading 001_dkcompiler_init.rb
Initializing DevKit compilers
Loading llvm.rb
Loading mingw.rb
Loading mingw64.rb
Loading tdm_mingw.rb
Loading common.rake
Loading defaults.rake
$ruby roullette.rb
0
Charlie bet $10 on 13.
He rolled a 29.
His payout is $0.
irb(main):006:0> FileUtils.mkdir("C:/foo")
Errno::ENOENT: No such file or directory - No such file or directory - C:/foo
from ./lib/fakefs/fileutils.rb:13:in `mkdir'
from (irb):6
irb(main):007:0> FileUtils.mkdir_p("C:/foo")
=> (FakeDir name:"foo" parent:"C:" size:0)
irb(main):008:0> FileUtils.touch("C:/foo/bar")
=> ["C:/foo/bar"]
irb(main):009:0> File.exists?("C:/foo/bar")
=> true