This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
defmodule Wg do | |
# Clamp random bytes for generating Curve25519 private key | |
# See https://github.com/tonarino/innernet/blob/main/wireguard-control/src/key.rs#L40 | |
# or | |
# https://github.com/WireGuard/wireguard-tools/blob/master/src/curve25519.h#L18 | |
def genkey do | |
bytes = :crypto.strong_rand_bytes(32) | |
<<head>> = binary_part(bytes, 0, 1) | |
<<tail>> = binary_part(bytes, 31, 1) |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFtM/Vuk9/rHOr6N3VXVFL/lUuokuee1nfAZpkkJhGKa jamil@Jamil's Macbook Pro |
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/openbsd6" | |
config.vm.provision "shell", inline: <<~SCRIPT | |
#!/usr/bin/env bash | |
set -xe | |
orig_dir=`pwd` | |
OTP_VER="21.3.8.14" |
#!/usr/bin/env bash | |
set -xe | |
orig_dir=`pwd` | |
OTP_VER="21.3.8.14" | |
ELIXIR_VER="1.10.2" | |
export AUTOCONF_VERSION=2.69 | |
# Set encoding |
defmodule CoinbasePro do | |
@moduledoc """ | |
CoinbasePro exchange wrapper. | |
""" | |
@config Application.get_env(:config, __MODULE__) | |
@api_url (if Mix.env == :prod do | |
"https://api.pro.coinbase.com" | |
else | |
"https://api-public.sandbox.pro.coinbase.com" |
#!/usr/bin/env bash | |
curl -s -i -XPOST 'http://127.0.0.1:8086/query' --data-urlencode "q=CREATE DATABASE order_history" > /dev/null | |
for file in *.gz; do | |
echo "extracting ${file}..." | |
unpigz -k $file | |
file2=${file::-3} | |
pair=${file2::-4} | |
exchange=${pair::-3} |
I hereby claim:
To claim this, I am signing this object:
# Represent states such as 'active', 'disabled', etc in the DB as an int | |
# | |
# Use like so: | |
# | |
# class MyModel < ActiveRecord::Base | |
# include StuffedTableColumns | |
# stuffed_column :status, *(%w(active inactive blocked disabled banned)) | |
# end | |
# TODO: use method_missing to match the column name |
// handle signed numbers | |
var toHex = function(decimalInt) { | |
if (decimalInt < 0) { | |
decimalInt += 0xFFFFFFFF + 1; | |
} | |
return decimalInt.toString(16).toUpperCase(); | |
}; | |
var set1, set2, set3, pair1, pair2, sym_key=''; |