Skip to content

Instantly share code, notes, and snippets.

View cblanc's full-sized avatar
🐇

Christopher Blanchard cblanc

🐇
View GitHub Profile
@bnagy
bnagy / gpgmutt.md
Last active March 30, 2024 07:52
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@f3l1x
f3l1x / aliases
Last active January 29, 2024 19:21
Docker - installation, tips, commands, aliases
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
@brennanMKE
brennanMKE / hero.ts
Last active April 1, 2024 16:16
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@andrius
andrius / Procfile
Last active July 22, 2022 22:00
How to dockerize #rails app with #puma. Edit config/application.rb and config/puma.rb #docker #ruby
api: bundle exec puma -C config/puma.rb
@bcherny
bcherny / react-rollup-typescript.md
Last active January 30, 2024 12:13
react + rollup + typescript boilerplate

terminal:

npm i --save-dev rollup rollup-watch rollup-plugin-typescript typescript typings
npm i -S react react-dom
./node_modules/.bin/typings install react react-dom --save
mkdir src dist
touch src/index.tsx
@jarbro
jarbro / dnsme2048dkim.md
Last active July 12, 2022 12:29
DNS Made Easy 2048 bit DKIM Support

DNS Made Easy 2048 bit DKIM support

If you have ever attempted to create your own DKIM key for your own mail server you know it can be a daunting task. Every flavor SMTP DKIM configuration is a bit different. Though once you've gotten your SMTP server configured with your private and public key, the easiest part of the entire process should be to make the necessary changes at your DNS provider,right? Unfortunately, not all providers support automatically accepting 2048 bit DKIM keys and you are ready to bang your head against the wall. Why dont they support a 2048 bit key or larger? Well, their system wont automatically handle keys larger than 255 contiguous characters because they haven't updated their interfaces to handle RFC 4408. More on this in a bit.

If you are using DNS Made Easy like I was, you probably ran across the error when trying to enter your DKIM key.

"Contiguous strings may not be longer than 255 characters"

Thankfully, [DNS RFC 4408](https

@iloveitaly
iloveitaly / capybara_fill_stripe_elements.rb
Created March 4, 2017 21:21
Fill in a Stripe Elements (https://stripe.com/docs/elements) credit card field using capybara
def fill_stripe_elements(card)
using_wait_time(15) { within_frame('stripeField_card_element0') do
card.to_s.chars.each do |piece|
find_field('cardnumber').send_keys(piece)
end
find_field('exp-date').send_keys("0122")
find_field('cvc').send_keys '123'
find_field('postal').send_keys '19335'
end }
@kyranjamie
kyranjamie / countries.enum.ts
Last active April 28, 2024 09:30
TypeScript enum Country Codes ISO 3166
export enum Country {
Afghanistan = 'AF',
AlandIslands = 'AX',
Albania = 'AL',
Algeria = 'DZ',
AmericanSamoa = 'AS',
Andorra = 'AD',
Angola = 'AO',
Anguilla = 'AI',
Antarctica = 'AQ',
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key