Skip to content

Instantly share code, notes, and snippets.

View font-awesome.patch
diff --git a/assets/css/app.scss b/assets/css/app.scss
index a475031..349e5e3 100644
--- a/assets/css/app.scss
+++ b/assets/css/app.scss
@@ -1,5 +1,9 @@
/* This file is for your main application css. */
@import "./phoenix.css";
+$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
+@import '~@fortawesome/fontawesome-free/scss/fontawesome';
+@import '~@fortawesome/fontawesome-free/scss/solid';
View font-awesome.patch
diff --git a/assets/css/app.scss b/assets/css/app.scss
index a475031..349e5e3 100644
--- a/assets/css/app.scss
+++ b/assets/css/app.scss
@@ -1,5 +1,9 @@
/* This file is for your main application css. */
@import "./phoenix.css";
+$fa-font-path: '~@fortawesome/fontawesome-free/webfonts';
+@import '~@fortawesome/fontawesome-free/scss/fontawesome';
+@import '~@fortawesome/fontawesome-free/scss/solid';
View aoc_day5.ex
defmodule Advent2018.Day5 do
def solve(input) do
parse_polymers(input, <<>>, nil)
end
def parse_polymers(<<>>, acc, _), do: byte_size(acc)
def parse_polymers(
<<a::size(2), _::size(1), b::size(5), rest::binary>>,
seen,
View day5.ex
defmodule Advent2018.Day5 do
def solve(input) do
parse_polymers(input, <<>>)
end
def parse_polymers(<<>>, acc), do: byte_size(acc)
def parse_polymers(<<a, rest :: binary>>, <<b, seen :: binary>>) when abs(a-b) == 32 do
parse_polymers(rest, seen)
end
View webpack.config.js
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './js/app.js',
stats: {
colors: true,
children: false,
modules: false,
View gist:a3e8f2d83aa17a17e9ad9df5bb70374f
(not in a group)
Phoenix
Phoenix.Digester
Phoenix.Logger
Phoenix.Naming
Phoenix.Token
CHANNELS AND TRANSPORTS
Phoenix.Channel
Phoenix.Presence
View keybase.md

Keybase proof

I hereby claim:

  • I am gazler on github.
  • I am gazler (https://keybase.io/gazler) on keybase.
  • I have a public key ASC34A5fIJLkSPcG8rrYwIvYCbzfb9hiktqZ8ES65JTX1go

To claim this, I am signing this object:

View new_pid.ex
{:new_transport_pid,
[current_function: {Process, :info, 1}, initial_call: {:proc_lib, :init_p, 5},
status: :running, message_queue_len: 0, messages: [], links: [#PID<0.249.0>],
dictionary: ["$initial_call": {:cowboy_tls, :proc_lib_hack, 5},
"$ancestors": [#PID<0.249.0>, #PID<0.248.0>, :ranch_sup, #PID<0.209.0>]],
trap_exit: true, error_handler: :error_handler, priority: :normal,
group_leader: #PID<0.208.0>, total_heap_size: 2208, heap_size: 1598,
stack_size: 21, reductions: 1728,
garbage_collection: [max_heap_size: %{error_logger: true, kill: true,
size: 0}, min_bin_vheap_size: 46422, min_heap_size: 233,
View Option 3.txt
* Install dependencies with `mix deps.get`<%= if ecto do %>
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`<% end %><%= if html do %>
* Install Node.js dependencies with `npm install`<% end %>
* Start Phoenix endpoint with `mix phoenix.server`
View checkout_tag.rb
difficulty 2
description "You need to fix a bug in the version 1.2 of your app. Checkout the tag `v1.2`."
setup do
repo.init
FileUtils.touch("app.rb")
repo.add("app.rb")
repo.commit_all("Initial commit")