Skip to content

Instantly share code, notes, and snippets.

View jbranchaud's full-sized avatar

Josh Branchaud jbranchaud

View GitHub Profile
public class ItemPrinter {
public static void printItem(Integer i) {
System.out.println(i.toString());
}
public static void printItem(String s) {
System.out.println(s);
}
}
@jbranchaud
jbranchaud / SomeLinks.md
Last active December 24, 2015 10:09
A bunch of links that I may or may not use at Meulén
@jbranchaud
jbranchaud / TestableJavaScript.md
Last active July 15, 2021 12:36
Resources on writing testable JavaScript

Testable JavaScript Resources

Testing JavaScript isn't just a thing you can read about in children's fairy tales.

This is just a scratch pad of everything I find. As the really good resources start to float to the top, I'll transition them to a more permanent GitHub repo.

General

@jbranchaud
jbranchaud / JavaScriptResources.md
Last active August 29, 2015 14:08
JavaScript Resources
@jbranchaud
jbranchaud / gist:bccead47f0e75e145db8
Last active December 20, 2024 00:22
Working With Buffers

Working With Buffers

Me

  • I'm Josh Branchaud
  • I work at Hashrocket
  • Twitter: @jbrancha
  • Github: @jbranchaud

Why talk about buffers?

puts '====='
puts 'defining the Parent class with #poop'
class Parent
def poop
puts "💩 💩"
end
end
puts 'defining the Child < Parent class with #poop'
# with postgres DDL
execute SQL<<-
create table users(
...
created_at timestamptz not null,
updated_at timestamptz not null
);
SQL
# with Rails DSL
@jbranchaud
jbranchaud / rails_slice.rb
Created August 13, 2015 21:45
slice and slice! in Rails
> {a: 1, b: 2, c: 3}.slice(:a)
=> {:a=>1}
> {a: 1, b: 2, c: 3}.slice!(:a)
=> {:b=>2, :c=>3}