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/sh | |
echo -n "doing post mobi things..." | |
ebook-convert book.mobi book_ebok.mobi --chapter-mark=none --page-breaks-before='/' | |
mv book.mobi book.mobi.pre-calibre | |
mv book_ebok.mobi book.mobi | |
echo "done!" |
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
import struct | |
import ctypes as C | |
from ctypes import util | |
_zlib = C.cdll.LoadLibrary(util.find_library('libz')) | |
class _z_stream(C.Structure): | |
_fields_ = [ | |
("next_in", C.POINTER(C.c_ubyte)), | |
("avail_in", C.c_uint), |
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 foo = "Bar" | |
undefined | |
> foo | |
"Bar" | |
> bar = "Foo" | |
"Foo" |
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
diff --git a/lib/cucumber/js_support/js_language.rb b/lib/cucumber/js_support/js_language.rb | |
index 06ced38..c1e858f 100644 | |
--- a/lib/cucumber/js_support/js_language.rb | |
+++ b/lib/cucumber/js_support/js_language.rb | |
@@ -24,7 +24,7 @@ module Cucumber | |
end | |
end | |
- @world.eval("(#{js_function.ToString})(#{js_args.join(',')});") | |
+ @world.eval("(#{js_function.to_s})(#{js_args.join(',')});") |
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
<html> | |
<head> | |
<style type="text/css"> | |
#canvas { | |
border: 1px solid black; | |
} | |
</style> | |
<script type="application/javascript"> | |
// key codes / directions | |
var left = 37, |
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
fun({Doc}) -> | |
case {proplists:get_value(<<"id">>, Doc)} of | |
{undefined} -> | |
ok; | |
{Id} -> | |
Emit(Id, Doc); | |
_ -> | |
ok | |
end | |
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
bash$ irb | |
>> class Foo; @@foo = :foo; class << self; def inside_foo; @@foo; end end end | |
=> nil | |
>> class << Foo; def outside_foo; @@foo; end end | |
=> nil | |
>> Foo.inside_foo | |
=> :foo | |
>> Foo.outside_foo | |
(irb):2: warning: class variable access from toplevel singleton method | |
NameError: uninitialized class variable @@foo in Object |
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
bash$ irb | |
>> class Foo; @@foo = :foo; class << self; def inside_foo; @@foo; end end end | |
=> nil | |
>> class << Foo; def outside_foo; @@foo; end; def outside_get_foo; send(:class_variable_get, :@@foo); end end | |
=> nil | |
>> Foo.inside_foo | |
=> :foo | |
>> Foo.outside_foo | |
(irb):2: warning: class variable access from toplevel singleton method | |
NameError: uninitialized class variable @@foo in Object |