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
@felipesere
felipesere / deploy.sh
Created October 19, 2015 23:27
Deploying form Circle-CI to AWS- ECS
#!/bin/bash
aws --version
aws configure set default.region us-west-2
aws configure set default.output json
echo "preparing task definition"
aws ecs describe-task-definition --task-definition applications | ./jq --arg x $CIRCLE_SHA1 ' .taskDefinition
| del(.status)
| del(.taskDefinitionArn)
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 / raw-sql-diesel-rust.rs
Created April 13, 2017 11:34
Error I get when using raw sql
#[derive(Queryable, Debug)]
pub struct DownloadAnswer {
pub timestamp: NaiveDateTime,
pub email: String,
pub requester: String,
pub answers: Vec<String>
}
impl FromSql<(diesel::types::Timestamp, diesel::types::Text, diesel::types::Text, diesel::types::Array<diesel::types::Text>), diesel::pg::Pg> for DownloadAnswer {
fn from_sql(bytes: Option<&[u8]>) -> Result<Self, Box<Error + Send + Sync>> {