This file contains hidden or 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/bash | |
tmux_session=pair | |
tmux rename-session 'pair' | |
tmux rename-window 'shell' | |
tmux send-keys -t $session_name:1 'source .env' Enter | |
tmux new-window -t $tmux_session:2 -n 'root' |
This file contains hidden or 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/bash | |
key=`cat ~/.ssh/id_rsa.pub` | |
for host in $*; do | |
ssh $host "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod -R 600 ~/.ssh/* && echo '$key' >> ~/.ssh/authorized_keys" | |
done |
This file contains hidden or 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/regexp_parser/scanner/scanner.rl b/lib/regexp_parser/scanner/scanner.rl | |
index e200cfc..96b2e70 100644 | |
--- a/lib/regexp_parser/scanner/scanner.rl | |
+++ b/lib/regexp_parser/scanner/scanner.rl | |
@@ -78,6 +78,8 @@ | |
conditional = '(?('; | |
+ absent_operator = '?~'; | |
+ |
This file contains hidden or 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/test/expression/test_base.rb b/test/expression/test_base.rb | |
index 21d22d0..27b253f 100644 | |
--- a/test/expression/test_base.rb | |
+++ b/test/expression/test_base.rb | |
@@ -65,7 +65,7 @@ class ExpressionBase < Test::Unit::TestCase | |
assert_equal '@0+12', root.coded_offset | |
# All top level offsets | |
- checks = [ | |
+ [ |
This file contains hidden or 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/bash | |
# A bash function/script used to run commands and tests using all the | |
# ruby-build-installed and chruby-managed versions of ruby on the system. | |
# Usage: mrun [command | script name] | |
# | |
# Without arguments, mrun will look for an executable file named run and run | |
# it. If an executable named run is not found, it will run rake. When given | |
# an argument (a script or a command, like bundle), it will run it with every |
This file contains hidden or 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
#define MY_FUNCALL_ARGC 3 | |
VALUE my_funcall(VALUE receiver, ID method_id, int argc, ...); | |
VALUE my_funcall_ex(VALUE data); | |
VALUE my_funcall2(VALUE receiver, ID method_id, int argc, VALUE *argv); | |
VALUE my_funcall2_ex(VALUE data); | |
// my_rescue: exception handler used by both of the wrappers below. |
This file contains hidden or 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
# Poor man's multiruby, a wrapper bash function/script around rvm. This is | |
# used to run all the specs through all the supported versions of ruby. | |
# | |
# Requires that all the rubies listed below are installed via rvm, and rvm to | |
# be sourced in the environment. | |
# | |
# rvm install ${version}; | |
# | |
# To install the required gems, run the following: | |
# |
This file contains hidden or 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
# defines character type constants (as arrays) and methods that test | |
# whether a given character belongs in one of them. | |
module CType | |
Digit = ('0'..'9').to_a.freeze | |
Lower = ('a'..'z').to_a.freeze | |
Upper = ('A'..'Z').to_a.freeze | |
Alpha = [Lower, Upper].flatten.freeze | |
Alnum = [Alpha, Digit].flatten.freeze | |
Word = [Alnum, '_'].flatten.freeze |
This file contains hidden or 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
# The rubyist version. Thanks to James Edward Gray II | |
def chop_utf8(s) | |
return unless s | |
lead = s.sub(/.\z/mu, '') | |
last = s[/.\z/mu] || '' | |
[lead, last] | |
end |
This file contains hidden or 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 CType | |
def self.alnum?(c); c =~ /[[:alnum:]]/ ? true : false end | |
def self.alpha?(c); c =~ /[[:alpha:]]/ ? true : false end | |
def self.blank?(c); c =~ /[[:blank:]]/ ? true : false end | |
def self.cntrl?(c); c =~ /[[:cntrl:]]/ ? true : false end | |
def self.digit?(c); c =~ /[[:digit:]]/ ? true : false end | |
def self.graph?(c); c =~ /[[:graph:]]/ ? true : false end | |
def self.lower?(c); c =~ /[[:lower:]]/ ? true : false end | |
def self.print?(c); c =~ /[[:print:]]/ ? true : false end | |
def self.punct?(c); c =~ /[[:punct:]]/ ? true : false end |
NewerOlder