Skip to content

Instantly share code, notes, and snippets.

View mtodd's full-sized avatar
🔐
[redacted]

Matt Todd mtodd

🔐
[redacted]
View GitHub Profile
@thpham
thpham / haproxy.conf
Last active February 28, 2024 07:41
test config haproxy for gRPC loadbalancing
global
tune.ssl.default-dh-param 1024
defaults
timeout connect 10000ms
timeout client 60000ms
timeout server 60000ms
frontend fe_http
mode http
@hitman401
hitman401 / main.rs
Last active April 16, 2024 13:12
Producer Consumer Sample in RUST
use std::sync::{Arc, Mutex, Condvar};
use std::thread;
struct Producer {
cvar: Arc<(Mutex<bool>, Condvar)>
}
impl Producer {
pub fn new(cvar: Arc<(Mutex<bool>, Condvar)>) -> Producer {
Producer {
@prakhar1989
prakhar1989 / richhickey.md
Last active January 30, 2025 06:39 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

Give me back my sanity

One of the many things I do for my group at work is to take care of automating as many things as possible. It usually brings me a lot of satisfaction, mostly because I get a kick out of making people's lives easier.

But sometimes, maybe too often, I end up in drawn-out struggles with machines and programs. And sometimes, these struggles bring me to the edge of despair, so much so that I regularly consider living on a computer-less island growing vegetables for a living.

This is the story of how I had to install Pandoc in a CentOS 6 Docker container. But more generally, this is the story of how I think computing is inherently broken, how programmers (myself included) tend to think that their way is the way, how we're ultimately replicating what most of us think is wrong with society, building upon layers and layers of (best-case scenario) obscure and/or weak foundations.

*I would like to extend my gratitude to Google, StackOverflow, GitHub issues but mostly, the people who make the

require "set"
module GitHub
module AttrIgnore
attr_reader :ignored_columns
def attr_ignore(*columns)
@ignored_columns ||= Set.new
@ignored_columns |= columns.map(&:to_s)
end
module ActionControllerRedirectPatch
extend ActiveSupport::Concern
class BadRedirectTo < StandardError; end
included do
config_accessor :allowed_url_protocols
self.allowed_url_protocols = ["http", "https", "mailto"]
end
# Proposal for mapping responses back to requests for Net::LDAP.
require "fiber"
module Net
module LDAP
class Connection
# Hash of Responses keyed by message_id
attr_reader :responses
# Fake socket to read/write from
@tmm1
tmm1 / sample.gif
Last active December 11, 2020 07:40
View Profiler
sample.gif
#!/bin/bash
DOMAIN=$1; shift
if [ -z "${DOMAIN}" ]; then
echo "No domain specified, assuming github.net"
DOMAIN="github.net"
fi
BASE=$(pwd)
ROOT_CA_KEYSIZE=4096
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)