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
List column_families = new ArrayList(); | |
CfDef base_columns_cf_definition = new CfDef(); | |
base_columns_cf_definition.setKeyspace("Indexes"); | |
base_columns_cf_definition.setName("PrimaryIndexes"); | |
base_columns_cf_definition.setColumn_type("Standard"); | |
base_columns_cf_definition.setComparator_type("BytesType"); | |
base_columns_cf_definition.setKey_validation_class("BytesType"); | |
base_columns_cf_definition.setDefault_validation_class("BytesType"); |
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
Rails.application.routes.draw do | |
mount Citygate::Engine => "/play" | |
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
Rails.application.routes.draw do | |
mount Citygate::Engine => "/play" | |
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
puts DATA.gets | |
__END__ | |
Hello Mr. World! |
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
str = "this is a template string with a %{placeholder} in it" | |
puts str % { "placeholder": "piece of text" } | |
# => this is a template string with a piece of text in it |
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 install | |
unless Dir.exists?(target_dir) | |
repo_url = if @use_ssh | |
"git@github.com:#{@author}/#{@repository}.git" | |
else | |
"git://github.com/#{@author}/#{@repository}.git" | |
end | |
exec "git clone#{@branch} #{repo_url} #{target_dir}" | |
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
def index | |
@plans = Plan.all | |
@graph = Graph.new(@plans) | |
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
(node.v.element.children.data[0].value as LibGumbo::GumboNode).value.type | |
# Lib | |
struct GumboNode | |
type: GumboNodeType | |
parent: GumboNode* | |
index_with_parent: LibC::SizeT | |
parse_flags: GumboParseFlags | |
v: Node |
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 "spec" | |
class Double | |
def initialize(@name, @stubs = {} of Symbol => Object) | |
end | |
def receives_and_returns(method_name = :none, return_value = true) | |
stubs[method_name] = return_value | |
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
$ crystal spec/compiler/lexer/lexer_string_array_spec.cr | |
Using compiled compiler at .build/crystal | |
Undefined symbols for architecture x86_64: | |
"_LLVMInitializeX86AsmPrinter", referenced from: | |
_*LLVM::init_x86:(Void | Nil) in LLVM.o | |
"_LLVMInitializeX86Target", referenced from: | |
_*LLVM::init_x86:(Void | Nil) in LLVM.o | |
"_LLVMInitializeX86TargetInfo", referenced from: | |
_*LLVM::init_x86:(Void | Nil) in LLVM.o | |
"_LLVMInitializeX86TargetMC", referenced from: |