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
DIGITS = '(\d+)' | |
EXPONENT = "([eE][+-]?#{DIGITS})" | |
SUFFIX = '(f|F|d|D)' | |
PATTERN = Regexp.union [ | |
"#{DIGITS}\\.#{DIGITS}?#{EXPONENT}?#{SUFFIX}?", | |
"\\.#{DIGITS}#{EXPONENT}?#{SUFFIX}?", | |
"#{DIGITS}#{EXPONENT}#{SUFFIX}?", | |
"#{DIGITS}#{EXPONENT}?#{SUFFIX}" | |
].map { |str| Regexp.new "\\A#{str}\\Z" } |
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
-----BEGIN CERTIFICATE----- | |
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAptYXJr | |
cmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj | |
b20wHhcNMTMxMjIwMDkwMjQ4WhcNMTQxMjIwMDkwMjQ4WjBBMRMwEQYDVQQDDApt | |
YXJrcmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ | |
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCumG1cuUOFpjYl | |
ktWNO8nA1FROqLnpC6GkT1CIBOG3VgXjh5vl3uAbvg6FaSU2jA0W91i6QhSaP1Ik | |
ReX3o6wBUnK15pN/wBULZY772WEg0Nb5wyrzSlS3dv8Jg6aGuw1bridSO0HSARvG | |
oQC++a1Ks64uy++OPwglaGBOcalNxwF1TUcYzi0K3a679+/8+kwaJt0pVtbT81RW | |
2oHli/SGB4oFu3uYnMoKk0yczfiSBdG7oSWBAcSEPsFRsUGn3vUdwCIlVXtKmmfW |
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 | |
mem = Array.new(30_000) | |
iptr = dptr = 0 | |
prog = File.read ARGV.first | |
jmp = lambda { |op, a, b| | |
(iptr = iptr.send(op, 1); jmp.call(op, a, b) if prog[iptr] == a) until prog[iptr] == b | |
} | |
nop = lambda {} | |
cmds = { | |
'>' => lambda { dptr += 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
finder = AX::Application.finder | |
dock = AX::Application.dock | |
click dock.application_dock_item(title:"Finder") | |
sleep 2 | |
type "\\SHIFT+\\COMMAND+\\G" | |
type "~" | |
click finder.window.button(id: "_NS:48") | |
click finder.window.radio_button(description: "icon view") | |
right_click finder.window.image(title: "Applications") do | |
findermenu = finder.standard_window.menu |
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/time.c b/time.c | |
index 332aad9..730d0e5 100644 | |
--- a/time.c | |
+++ b/time.c | |
@@ -10,6 +10,7 @@ | |
#include "macruby_internal.h" | |
#include "ruby/node.h" | |
+#include "id.h" | |
#include "vm.h" |
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
def foo *args | |
arg = args.last | |
if arg.zero? | |
args | |
else | |
foo(args << arg - 1) | |
end | |
end | |
p foo 3 |
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 'thread' | |
## | |
# A basic, serial data flow | |
# | |
# If you have a long process for a data set, consider performing steps | |
# of the process concurrently. Even simply reading a file and writing it | |
# back out elsewhere (i.e. a socket) can have increased throughput by | |
# using a pipeline. | |
# |
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
framework 'AVFoundation' | |
MOUNTAIN_LION_APPKIT_VERSION = 1187 | |
if NSAppKitVersionNumber >= MOUNTAIN_LION_APPKIT_VERSION | |
framework '/System/Library/Frameworks/CoreGraphics.framework' | |
end | |
## | |
# Screen recordings, easy as pie. |
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
○ set -x ; rvm --trace install macruby-nightly ; set +x | |
+-zsh:6> rvm --trace install macruby-nightly | |
+ [[ -n '' ]] | |
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ /scripts/cli : __rvm_parse_args() 790 > [[ -z '' ]] | |
+ /scripts/cli : __rvm_parse_args() 790 > [[ -n '' ]] | |
+ /scripts/cli : __rvm_parse_args() 792 > [[ 0 -eq 1 ]] | |
+ /scripts/cli : __rvm_parse_args() 792 > [[ -n '' ]] | |
+ /scripts/cli : __rvm_parse_args() 26 > [[ -n install ]] |
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
± VM_DISABLE_RBO=1 gem install minitest --backtrace | |
ERROR: While executing gem ... (NameError) | |
uninitialized constant YAML::PrivateType | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/specification.rb:672:in `block' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/specification.rb:672:in `_load' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/spec_fetcher.rb:134:in `fetch_spec' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/spec_fetcher.rb:95:in `block' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/spec_fetcher.rb:94:in `fetch_with_errors' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/dependency_installer.rb:110:in `find_gems_with_sources' | |
/Library/Frameworks/MacRuby.framework/Versions/0.12/usr/lib/ruby/1.9.2/rubygems/commands/install_command.rb:121:in `bl |
NewerOlder