Skip to content

Instantly share code, notes, and snippets.

View leehambley's full-sized avatar

Lee Hambley leehambley

View GitHub Profile

Senior Backend Developer at Devengo

Devengo is a startup focused on a simple but ambitious mission: make finance a fairer place. Founded by well-known fintech players Fernando Cabello-Astolfi and Alberto Molpeceres our first product is an innovative social benefit that allows workers to collect their earned wages in real-time. Your money, when you need it.

The problem

Economists identify¹ three main challenges any person and household must face to reach a sustainable level of financial wellness: having sufficient and stable income, maintaining an economic-financial balance that limits problems of overindebtedness and avoiding severe poverty.

The last two challenges are the most pressing ones as they have an immediate effect on the material living conditions of the population and they compound over time sinking the households' economies further and further.

In Spain al

@headius
headius / tikka_masala.md
Last active March 26, 2023 21:38
Chicken Tikka Masala

Chicken tikka masala

Time: 50 minutes

Serves: 4-6

Ingredients

require 'fiddle'
color_iter = DATA.readlines.map(&:chomp).map { |i|
i = i.to_i(16)
[(i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF, 255]
}.each
SIZEOF_HEAP_PAGE_HEADER_STRUCT = Fiddle::SIZEOF_VOIDP
SIZEOF_RVALUE = 40
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@icy-arctic-fox
icy-arctic-fox / Dockerfile
Last active March 2, 2018 21:34
Dockerfile for Grafana with Elasticsearch alerting
FROM centos:6.6
# Install dependencies.
RUN curl -sL https://rpm.nodesource.com/setup_6.x | bash - && \
yum install -y initscripts curl tar gcc libc6-dev git nodejs bzip2 freetype fontconfig urw-fonts
# Install Go.
# Note that 1.4 is needed first to build 1.9.
ENV GOLANG_VERSION 1.4
RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
@kennwhite
kennwhite / https.go
Last active December 24, 2023 22:06
Simple https http/2 static web server with HSTS & CSP (A+ SSLLabs & securityheaders.io rating) in Go using LetsEncrypt acme autocert
package main
import (
"crypto/tls"
"golang.org/x/crypto/acme/autocert"
"log"
"net"
"net/http"
)
@ursuad
ursuad / kafka-cheat-sheet.md
Last active March 14, 2024 10:32
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@wr0ngway
wr0ngway / rubytrace
Last active March 14, 2023 11:02
Uses gdb to dump ruby backtraces for all threads, and displays them in an easily readable format
#!/bin/bash
PID=$1
RUBY_BINARY=`which ruby`
BT_FILENAME="/tmp/ruby-backtrace-$PID-$(date +%s).txt"
cmdfile=$(mktemp)
cat <<EOF > $cmdfile
set \$old_stdout = dup(1)
set \$old_stderr = dup(2)
@wjessop
wjessop / gist:14c51363acb189b17963
Last active August 29, 2015 14:03
90's house and dance
Please make suggestions to @will_j on twitter
- Additions
- Removals
- Ordering
- etc.
Rules:
- 90's Dance or house in the style of what's already on the list
@jhbabon
jhbabon / 2.1.0-railsexpress
Last active January 2, 2016 02:48
rbenv recipe to install 2.1.0 with railsexpress patch
build_package_reconfigure() {
test -f configure || autoconf
}
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/01-current-2.1.1-fixes.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/02-zero-broken-tests.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/03-improve-gc-stats.patch