Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / tracker_blocking.rb
Last active July 27, 2023 14:19
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@kgrvamsi
kgrvamsi / docker-compose.yml
Created April 10, 2020 06:14
Traefik, Docker-Compose, Nginx routing example -- port 80 http only, for now
traefik:
image: traefik
command: --web --docker --docker.watch --docker.domain=localhost --logLevel=DEBUG --entryPoints="Name:http Address::80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
@georgepaoli
georgepaoli / README.md
Last active November 26, 2020 00:26
Deploy Traefik in GKE

Deploy Traefik in Google Kubernetes Engine

1 - Get value of password field

  • gcloud container clusters describe CUSTER_NAME --zone ZONE_NAME | grep password

2 - Configure RBAC

3 - Deploy Traefik Ingress Service with NodePort

@thbar
thbar / _readme.md
Last active March 27, 2020 19:42
Using minitest to regression test your Jekyll static site

Using minitest to regression-test your Jekyll static site

I recently had to upgrade my blog, which involved changes such as:

  • Replacing a sitemap plugin
  • Upgrading from jekyll 2.5.3 to 3.8.4
  • Upgrading from jekyll-assets 0.7.8 to 3.0.11
  • (etc)

The upgrading process was not trivial, and some parts (e.g. RSS, sitemap, or twitter cards tags) are not immediately visible, so I decided to add unit tests on the generated content.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 4, 2024 05:06
set -e, -u, -o, -x pipefail explanation
@maxivak
maxivak / webpacker_rails.md
Last active April 13, 2023 18:46
Webpack, Yarn, Npm in Rails
@mrrooijen
mrrooijen / README.md
Created May 6, 2018 04:14
How to enable SSL with Redis (Ruby Driver) on RedisLabs.

How to enable SSL with [Redis] ([Ruby Driver]) on [RedisLabs].

Typically, this is how you'd connect to Redis:

Redis.new(url: ENV["REDIS_URL"])

Where REDIS_URL uses the following format:

@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
import re
class Grep:
def __init__(self, pattern):
self.pattern = re.compile(pattern)
def __ror__(self, iterable):
for x in iterable:
if self.pattern.match(x):
yield x
class Wc:
@manjula-dube
manjula-dube / .eslintrc.js
Created February 6, 2018 15:55
.eslintrc.js
// use this format since .eslintrc is deprecated.
// You can logically derive this format.
module.exports = {
parser: 'babel-eslint',
extends: [
'plugin:flowtype/recommended',
'plugin:jest/recommended',
'plugin:react/recommended',
'eslint-config-airbnb',