Skip to content

Instantly share code, notes, and snippets.

View Gazler's full-sized avatar

Gary Rennie Gazler

View GitHub Profile
@Gazler
Gazler / sqlite_crash.exs
Created October 24, 2023 11:03
sqlite_crash.exs
Mix.install([
{:ecto_sql, "~> 3.10"},
{:ecto_sqlite3, ">= 0.12.0"},
{:exqlite, ">= 0.0.0"}
])
Application.put_env(:foo, Repo, database: ":memory:", pool_size: 1)
defmodule Repo do
use Ecto.Repo,
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';
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';
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,
@Gazler
Gazler / day5.ex
Last active December 6, 2018 08:02
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
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,
(not in a group)
Phoenix
Phoenix.Digester
Phoenix.Logger
Phoenix.Naming
Phoenix.Token
CHANNELS AND TRANSPORTS
Phoenix.Channel
Phoenix.Presence

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:

{: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,
* 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`