👷♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://genius.cat-v.org/brian-kernighan/articles/beautiful | |
// c matches any literal character c | |
// . matches any single character | |
// ^ matches the beginning of the input string | |
// $ matches the end of the input string | |
// * matches zero or more occurrences of the previous character | |
/* match: search for regexp anywhere in text */ | |
int match(char *regexp, char *text) |
Moved to Shopify/graphql-design-tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Foo.Factory do | |
alias Foo.Blog.{Post, Comment} | |
def params_for(Post) do | |
%{ | |
title: Faker.Lorem.sentence(), | |
body: Faker.Lorem.paragraph() | |
} | |
end |
A Pen by Colin Lohner on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Create in-memory SQLite database | |
$sqlite = new PDO('sqlite::memory:'); | |
// Generate schema (for whatever tables you want) | |
$sqlite->prepare('CREATE TABLE users(id, family_id, first_name, last_name, email)')->execute(); | |
$sqlite->prepare('CREATE TABLE families(id, name, phone, address)')->execute(); | |
// Insert pre-defined data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Move erts IO Polling to dedicated threads | |
# https://github.com/erlang/otp/pull/1552 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:1.4.5 as asset-builder-mix-getter | |
ENV HOME=/opt/app | |
RUN mix do local.hex --force, local.rebar --force | |
# Cache elixir deps | |
COPY config/ $HOME/config/ | |
COPY mix.exs mix.lock $HOME/ | |
COPY apps/myproject_web/mix.exs $HOME/apps/myproject_web/ | |
COPY apps/myproject_web/config/ $HOME/apps/myproject_web/config/ |
NewerOlder