Skip to content

Instantly share code, notes, and snippets.


Thibaut Barrère thbar

View GitHub Profile
View git-fetch-upstream-tags
Let [tag] = any tag in upstream repo
git fetch upstream --tags
git push origin --tags
thbar /
Created Jan 7, 2021 — forked from fchabouis/
Rust Actix simple Actor communication
use actix::prelude::*;
/// Define message
#[rtype(result = "Result<String, std::io::Error>")]
struct WhatsYourName;
#[rtype(result = "()")]
struct SetYourName {
thbar / spec_helper.rb
Created Aug 6, 2020
Apparition with Puffing Billy configuration for RSpec
View spec_helper.rb
build_driver = -> (app:, proxy:) {
options = {
window_size: [1500, 1224],
screen_size: [1500, 1224],
headless: true,
js_errors: true,
ignore_https_errors: true,
browser_options: {
'ignore-certificate-errors' => nil
thbar / import_multiple_csv_to_database.rb
Last active May 14, 2020
Automating the process of writing incoming CSV to a SQL database (with Kiba ETL)
View import_multiple_csv_to_database.rb
# for source
require 'kiba-common/sources/enumerable'
require 'kiba-common/sources/csv'
# to create 1 source out of each input file
require 'kiba-common/transforms/source_adapter'
# for target - Kiba Pro is the commercial extension
thbar / settings.jsonc
Last active May 12, 2020
Current minimalistic VSCode setup (à la atom/textmate)
View settings.jsonc
// NOTE: these settings work well for me
// using Ruby, Elixir and Assembly languages.
// I would probably do something different if
// I worked more with other languages at the moment
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"workbench.startupEditor": "newUntitledFile",
View history.txt
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
thbar / redix.ex
Created May 3, 2020 — forked from tgodfrey/redix.ex
Elixir Module for working with MessageBus
View redix.ex
defmodule MyApp.Redix do
@pool_size 5
# How long, in seconds, to keep messages in the backlog
@max_backlog_age 604800
# How many messages may be kept in the global backlog
@max_global_backlog_size 2000
# How many messages may be kep in the per-channel backlog
@max_backlog_size 1000
thbar /
Created Apr 30, 2020 — forked from joshuap/
Deploy a new Rails app to AWS Lambda using Lamby
thbar / test_puma_runs.rb
Last active Apr 20, 2020
How to start and stop Puma programmatically (e.g. from a test)
View test_puma_runs.rb
# inspiration -> the puma tests
require 'puma'
require 'puma/server'
def with_puma_running(app)
server =, Puma::Events.strings)
server.add_tcp_listener "", 0
port = server.connected_port
yield(port: port)