Skip to content

Instantly share code, notes, and snippets.

View Gazler's full-sized avatar

Gary Rennie Gazler

View GitHub Profile
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
defmodule MasterProxy do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
cowboy = Plug.Adapters.Cowboy.child_spec(:http, MasterProxy.Plug, [])
@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: