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
Install WireGuard via whatever package manager you use. For me, I use apt. | |
$ sudo add-apt-repository ppa:wireguard/wireguard | |
$ sudo apt-get update | |
$ sudo apt-get install wireguard | |
MacOS | |
$ brew install wireguard-tools | |
Generate key your key pairs. The key pairs are just that, key pairs. They can be |
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
// passes | |
total = 2147483647 * 2 + 1; | |
a = new Array(total); | |
console.log("total:" + total + " length:" + a.length); | |
// fails | |
total = 2147483647 * 2 + 2; | |
a = new Array(total); | |
console.log("total:" + total + " length:" + a.length); |
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
Traceback (most recent call last): | |
File "/home/elvis/emscripten/emcc", line 1272, in <module> | |
flush_js_optimizer_queue() | |
File "/home/elvis/emscripten/emcc", line 1222, in flush_js_optimizer_queue | |
final = shared.Building.js_optimizer(final, js_optimizer_queue, jcache) | |
File "/home/elvis/emscripten/tools/shared.py", line 1057, in js_optimizer | |
return js_optimizer.run(filename, passes, NODE_JS, jcache) | |
File "/home/elvis/emscripten/tools/js_optimizer.py", line 179, in run | |
return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache)) | |
File "/home/elvis/emscripten/tools/shared.py", line 435, in run_and_clean |
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
// helpers | |
function areEnemies(robot, sighted) { | |
var sightedIsChild = (robot.id == sighted.parentId); | |
var sightedIsParent = (robot.parentId == sighted.id); | |
return !(sightedIsChild || sightedIsParent); | |
}; | |
function baseStep(robot) { |
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 save_deed_and_related_documents(deed) | |
unless deed.make_reference.nil? | |
deed.make_reference.each do | reference | | |
deed.each do | record | | |
puts record | |
end | |
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
def save_deed_and_related_documents(deed) | |
unless deed.make_reference.nil? | |
deed.make_reference.each do | reference | | |
reference.each do | record | | |
puts record | |
end | |
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
def save_deed_and_related_documents(deed) | |
unless deed.make_reference.nil? | |
deed.make_reference.each do | reference | | |
puts reference | |
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
Failure/Error: document.nokogiri_document.should be_a_kind_of(Nokogiri) | |
expected #<Nokogiri::HTML::Document:0x8041d478 name="document" children=[#<Nokogiri::XML::DTD:0x80a01a24 name="html">, #<Nokogiri::XML::Element:0x80b02a2c name="html">]> to be a kind of Nokogiri |
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
describe "#create_nokogiri_object" do | |
it "if supplied document is not a nokogiri object" do | |
document = DeschutesDocument.new('<html>') | |
document.nokogiri_document.should be_a_kind_of(Nokogiri) | |
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
A few examples will help to clarify these operations. Let's begin by creating two arrays: | |
operating_systems = ["Fedora", "SuSE", "RHEL", "Windows", "MacOS"] | |
linux_systems = ["RHEL", "SuSE", "PCLinuxOS", "Ubuntu", "Fedora"] | |
Now, we can create a union of the two arrays: | |
operating_systems | linux_systems | |
=> ["Fedora", "SuSE", "RHEL", "Windows", "MacOS", "PCLinuxOS", "Ubuntu"] |
NewerOlder