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 -x | |
set -e ; set -u | |
export LC_ALL=C | |
h=${h:-localhost} | |
dr="/tmp/annex" | |
chmod a+rwx -R pc1 pc2 || true | |
rm -Rf pc1 pc2 |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
doc = Nokogiri::XML(%q{ | |
<doc> | |
<sp id="sp1"> | |
<speaker>Second</speaker> | |
<l n='5'>a</l> | |
<l n='8'>a</l> |
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
# Situation: | |
# * one laptop computer | |
# * one desktop computer | |
# * one remote server | |
# * one S3 bucket | |
# | |
# The laptop computer and the desktop computer have a directory ~/Docs with many GB of data. | |
# We do not want to download the data we already have | |
# Initial setup on the laptop computer |
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 "compass/reset"; | |
@import "susy"; | |
$total-columns : 3; | |
$column-width : 80%; | |
$gutter-width : 20%; | |
$grid-padding : 0; | |
$container-width: 100%; | |
$container-style: fluid; |
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
#!/usr/bin/ruby1.8 | |
class Main | |
module Extra | |
def define_fancy_method(method_name) | |
define_method(method_name) do |arg| | |
return [arg, arg].join(self.separator) | |
end | |
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
#!/usr/bin/env ruby | |
require 'prawn' | |
require "prawn/measurement_extensions" | |
paper_sizes = { | |
'A4' => [210, 297], | |
'A5' => [148, 210], | |
'A6' => [105, 148], |
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
Title: Error message contains stale link to builting OpenSSL wiki page | |
While installing the rawr gem I got this error | |
JRuby limited openssl loaded. gem install jruby-openssl for full support. | |
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL | |
That URL no longer exists and redirects to the main page. | |
Could you please update the error message with the new URL of that page? |
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
Title: Files are not flushed to disk unless explicitly 'close'd | |
Open files are not flushed to disk when an application exits. If the .close method is used, the files are correctly written to disk. | |
This little test-case illustrates the problem: | |
out = File.new('foobar', 'w') | |
out.write('hi') | |
out.puts |
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 no-close.rb | |
$ cat foobar | |
hi | |
$ | |
$ ~/jruby-1.3.1 no-close.rb | |
$ cat foobar | |
$ |
NewerOlder