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
function java_change_16 { | |
export MY_JAVA_VERSION=1.6 | |
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home | |
} | |
function java_change_17_15 { | |
export MY_JAVA_VERSION=1.7_15 | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home/ | |
} |
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
++++++++++ | |
[>+++++++>++++++++++>+++>+<<<<-] | |
>++.>+.+++++++..+++.>++.<< | |
+++++++++++++++.>. | |
+++.------.--------.>+.>. |
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
function silencing_stderr() { | |
$* 2>/dev/null | |
} | |
function branch_names() { | |
git br | awk '{print $1}' | grep -v '*' | xargs | |
} | |
function most_recent_commit() { | |
git log . | grep "Date: " | cut -c 9- | head -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
function silencing_stderr() { | |
$* 2>/dev/null | |
} | |
function branch_names() { | |
git br | awk '{print $1}' | grep -v '*' | xargs | |
} | |
for branch_name in $(branch_names) | |
do |
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 'csv' | |
module SQLAwesome | |
class RDBMS | |
def self.new_from_csv_dir directory | |
tables = {} | |
Dir["#{directory.chomp("/")}/*.csv"].each do |file| | |
table = [] | |
CSV.foreach(file, headers: true) { |row| table << row } | |
tables[file.split("/").last.chomp(".csv")] = table |
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
module Parslet::Atoms::DSL | |
def raw_as(name) | |
Parslet::Atoms::RawAttribute.new self, name | |
end | |
end | |
class Parslet::Atoms::RawAttribute < Parslet::Atoms::Base | |
attr_reader :parslet, :name | |
def initialize(parslet, name) | |
super() |
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
# currently, this prints out | |
# | |
# 3 | |
# 3 | |
# 3 | |
# | |
# I think each should introduce a new scope and the binding should be created for the runnable st | |
# it captures that scopes `i` instead of having the i be leaked to the outer scope | |
@@rs = [] |
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 java.lang.Integer | |
import java.util.HashMap | |
import java.util.ArrayList | |
import java.util.List | |
import java.util.concurrent.LinkedBlockingQueue | |
class HashMapMania | |
def self.initialize:void | |
@@hole = LinkedBlockingQueue.new | |
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
# example from the documentation | |
# ============================== | |
params = ActionController::Parameters.new({ | |
person: { | |
name: 'Francesco', | |
age: 22, | |
pets: [{ | |
name: 'Purplish', | |
category: 'dogs' | |
}] |
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
class RawAttribute < Parslet::Atoms::Base | |
attr_reader :slice | |
def initialize(slice) | |
super() | |
@slice = slice | |
end | |
def apply(source, context, consume_all) |