find: :(\w+)=>
replace: $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
def deeply_validate_json_response(entry, out) | |
entry.each do |k, v| | |
if v.is_a? Hash | |
deeply_validate_json_response(v, out[k.to_s]) | |
elsif v.is_a? Array | |
v.each { |obj| deeply_validate_json_response(obj, out[k.to_s]) } | |
else | |
v.must_equal out[k.to_s] | |
end | |
end |
I hereby claim:
- I am hfabre on github.
- I am hfabre (https://keybase.io/hfabre) on keybase.
- I have a public key ASCt6Bla5ly_N3dcU0X9yo3E_a4scNwK8WrIZZPugpYRvwo
To claim this, I am signing this object:
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
package main | |
import ( | |
"github.com/sqweek/dialog" | |
r "github.com/lachee/raylib-goplus/raylib" | |
) | |
func main() { | |
path := "" |
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 center_x | |
@x / 2 | |
end | |
def center_y | |
@y / 2 | |
end | |
def normalize(x, y) | |
magn = Math.sqrt(x*x + y*y) |
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
pub const Color = struct { | |
a: u8, | |
r: u8, | |
g: u8, | |
b: u8 | |
}; | |
var new_mrb = mruby.open(); | |
var mrb_color_class = new_mrb.define_class("Color", new_mrb.object_class()); | |
new_mrb.define_method(mrb_color_class, "initialize", mrb_initialize_color, .{ .req = 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
def handle_event("import", _params, socket) do | |
results = | |
consume_uploaded_entries(socket, :import, fn %{path: path}, _entry -> | |
temp_dir = Briefly.create!(type: :directory) | |
csv_file = Path.join(temp_dir, "import.csv") | |
# Attempt to create a new hard link to the file | |
case File.ln(path, csv_file) do | |
:ok -> | |
{:ok, csv_file} |