This is my own interpretation of how I like to work, feedback welcome! Especially if my own view of how I think I like to work doesn't match your experience of how it seems I like to work!
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
# concepts/thing/contract/contract.rb | |
require 'disposable/twin/property/hash' | |
module Thing::Contract | |
class Contract < Reform::Form | |
include Disposable::Twin::Property::Hash | |
property :data, field: :hash do | |
property :foo_bar |
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 "benchmark" | |
n = 100_000 | |
Benchmark.bm(7) do |x| | |
x.report("merge! : ") do | |
a = {} | |
n.times { |i| a.merge! i => "1" } | |
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
// simple constructor | |
// | |
private final int x; | |
private final int y; | |
private final String z; | |
| |
public MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = 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
class Person | |
@@klass_name = "Person" | |
def initialize(name) | |
@name = name | |
end | |
def self.klass_name | |
@@klass_name | |
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
There is a Hare and | |
a tortoise. | |
The hare and tortoise race. | |
The hare thinks that he is fast | |
and the tortoise is slow. | |
He decided to take a nap. | |
But he slept for too long and the tortoise passes him. | |
And the tortoise won the race. |
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
/^((\+\d+)*(\d+)[- ])*\d{3,}[- ]*\d{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
root (hd0, 5) | |
kernel /vmlinuz root=/dev/sda6 | |
initrd /initrd.img | |
boot |
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
<?php | |
/** | |
* Will take given parameters, query and return a list of listings for given params | |
* | |
* PARAMETERS | |
* =================== | |
* | |
* q Search string. Default = null (optional) | |
* build Car's build type Default = null (optional) | |
* make Manufacturer Default = null (optional) |
NewerOlder