Skip to content

Instantly share code, notes, and snippets.

View DavidAntaramian's full-sized avatar

David Antaramian DavidAntaramian

View GitHub Profile
@DavidAntaramian
DavidAntaramian / packages.diff
Created April 5, 2019 04:25
Fix issue where Hydra does not provide lv for Spacemacs
diff --git a/layers/+distributions/spacemacs-bootstrap/packages.el b/layers/+distributions/spacemacs-bootstrap/packages.el
index d1b7b5fce..7a073a419 100644
--- a/layers/+distributions/spacemacs-bootstrap/packages.el
+++ b/layers/+distributions/spacemacs-bootstrap/packages.el
@@ -19,6 +19,7 @@
(diminish :step bootstrap)
(evil :step bootstrap)
(hydra :step bootstrap)
+ (lv :step bootstrap)
(use-package :step bootstrap)
hexdump -n 12 -e '1/4 "%08x" 1 "\n"' /dev/random
defmodule LoadTester do
@table_name :http_results
@url "https://example.com"
def test() do
tab =
:ets.new(table_name, [
:set,
:named_table,
:public,
@DavidAntaramian
DavidAntaramian / benchee_output.txt
Last active July 16, 2018 22:36
Testing the use of inspect/1 with a function yielding an integer
Operating System: macOS"
CPU Information: Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
Number of Available Cores: 8
Available memory: 16 GB
Elixir 1.6.4
Erlang 20.3.4
Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
@DavidAntaramian
DavidAntaramian / endpoint.ex
Created July 6, 2018 16:44
Using Ecto & Phoenix init/2 Callbacks
defmodule MyApp.Endpoint do
use Phoenix.Endpoint, otp_app: :my_app
# ... a bunch of plugs
def init(_, config) do
port = System.get_env("PORT")
http_config =
config
[Unit]
Description=timber
After=network-online.target
Requires=network-online.target
[Service]
User=odin
Group=odin
WorkingDirectory=/opt/app
ExecStart=/opt/app/bin/timber foreground
# This should be at in /var/logrotate.d/timber-agent.conf
/var/log/timber-agent.log {
missingok
notifempty
size 100K
rotate 2
postrotate
service timber-agent restart
endscript
rm -r ~/.asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
cd ~/.asdf
git checkout v0.3.0
cd ~/
source .bash_profile
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
@DavidAntaramian
DavidAntaramian / 01_timber_install.config
Last active September 6, 2017 03:06
Elasticbeanstalk extension providing Timber Agent 0.3.x with automatic key setting
###
#
# Installation configuration script for Timber.io's log collection agent
#
# * Docs: https://timber.io/docs/platforms/aws-elastic-beanstalk
# * Support: support@timber.io
#
# To use this file:
#
# 1. Set the environment variable "TIMBER_API_KEY" using `eb setenv`
** (CompileError) lib/ex_aws/operation/rest_json.ex:36: cannot define module ExAws.Operation.ExAws.Operation.JSON because it is currently being defined in lib/ex_aws/operation/json.ex:38