Skip to content

Instantly share code, notes, and snippets.


Christopher Blanchard cblanc

View GitHub Profile
bcherny /
Last active Jan 17, 2022
react + rollup + typescript boilerplate


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
andrius / Procfile
Last active Sep 24, 2021
How to dockerize #rails app with #puma. Edit config/application.rb and config/puma.rb #docker #ruby
View Procfile
api: bundle exec puma -C config/puma.rb
brennanMKE / hero.ts
Last active Jan 23, 2022
Example of Mongoose with TypeScript and MongoDb
View hero.ts
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;
f3l1x / aliases
Last active Apr 7, 2021
Docker - installation, tips, commands, aliases
View aliases
# ------------------------------------
# Docker alias and function
# ------------------------------------
# Get latest container ID
alias dl="docker ps -l -q"
# Get container process
alias dps="docker ps"
bnagy /
Last active Jan 12, 2022
Mutt, Gmail and GPG

GPG / Mutt / Gmail


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
atika / pushover
Last active Oct 19, 2021
Send a pushover notification from Bash
View pushover
# ./ -t "Pushover via Bash" -m "Pushover message sent with bash from $(hostname -f)" -p1 -s siren -u -n "Google"
APP_LIST="monitor, backup, alert" # FOR USAGE
myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
grugq / gist:03167bed45e774551155
Last active Jan 12, 2022
operational pgp - draft
View gist:03167bed45e774551155

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

xem /
Last active Jan 15, 2022
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit

(Official Slack room: / join us on

benshimmin / gist:9401836
Created Mar 6, 2014
How to raise a validation error in Rails after save
View gist:9401836
# This probably isn't a good thing to want to do, but it came up for me,
# so in the spirit of helping others with weird problems (and because this
# seems to be documented almost nowhere):
after_save do
if some_failing_condition
errors.add(:something, "some failure happened.")