Skip to content

Instantly share code, notes, and snippets.

View felipesere's full-sized avatar
🦀
Doing Rust stuff

Felipe Seré felipesere

🦀
Doing Rust stuff
View GitHub Profile
@felipesere
felipesere / keybase.md
Created October 6, 2014 08:31
Keybase verification

Keybase proof

I hereby claim:

  • I am felipesere on github.
  • I am felipesere (https://keybase.io/felipesere) on keybase.
  • I have a public key whose fingerprint is 8115 7877 2925 1002 15EE E36A 899F CBB0 4B24 02A0

To claim this, I am signing this object:

@felipesere
felipesere / cargo-test
Created January 20, 2015 23:23
Cargo: dont supress println!
$ cargo test -- --nocapture
Erlang release
Try -init_debug (and possible -loader_debug) to get more more info about
what is going on during boot.
@felipesere
felipesere / internal-journeyman-tour.md
Created January 15, 2017 18:42
Internal Journeyman Tour

Crafter visiting days

Problem:

Its hard to get tractable feedback when we are on client site, because Jim (or any other person) is not there to assess the sitution and address it immediately. The feedback we do get is very delayed and relies on us telling "the story of what happend".

This it not much different from the situation we were in when we started the apprenticeship 2.5 years ago: Jim was busy estabilishing client relationships and running the day to day business.

@felipesere
felipesere / internal-journeyman-tour.md
Last active March 2, 2017 22:17
Internal Journeyman Tour

Crafter visiting days

Problem:

It is hard to get tractable feedback when we are on client site because Jim (or any other person) is not there to assess the situation and address it immediately. The feedback we do get is very delayed and relies on us telling "the story of what happened".

This it not much different from the situation we were in when we started the apprenticeship 2.5 years ago: Jim was busy establishing client relationships and running the day to day business. A large body of knowledge that has carried us all through the apprenticeship stems from the impromptu conversations we had in the office, right after our IPMs and with running code in front of us. Issues and potential solutions were spotted by other apprentices and worked on directly with a pair.

We want that feedback cycle back.

@felipesere
felipesere / diesel-errors.rs
Created March 17, 2017 13:13
Errors I am getting when trying to use an enum with Diesel
> This is the `enum` I am trying write/read to the DB
#[derive(Clone, Copy)]
#[repr(i16)]
pub enum Kind {
Technical = 1,
Client = 2,
Community = 3,
}
lazy_static! {
pub static ref ROCKET: rocket::Rocket = {
println!("Creating a rocket");
super::build_rocket("postgres://advisor_test@localhost/advisor_test")
};
}
#[test]
fn through_the_rocket_infrastructure() {
@felipesere
felipesere / prepare-commit-msg
Created October 29, 2017 21:26
A script that prepends elm or ex depending on what gets commited
#!/usr/bin/env ruby
require 'set'
message = ARGV[0] # the file that contains the message (change this!)
source = ARGV[1] # can be template, merge, squash, commit
commit_id = ARGV[2]
if ["merge","squash"].include?(source)
return 1 # do nothing
@felipesere
felipesere / questions.md
Last active July 8, 2018 16:32
Programmable Getter in Java 6

"Programmable" getter in Java 6.

The get(...) method takes a Question and evaluates it. Questions have a bunch of "modern" chainable methods like:

  • refineWith(Question q) or then (Question q)
  • or(Question) and orAsk(Question q) and orAsk(otherSubject, Question q) for a matching answer type
  • orDefaultTo(answer) in case of exceptions or null