Skip to content

Instantly share code, notes, and snippets.

puke nuke

Victor Borja vic

puke nuke
View GitHub Profile
vic /
Created Dec 9, 2021
An Scala RPC API using Sloth (with binary Boopickle serialization) and Twitter Finagle Mux as transport.
* Usage:
* ammonite runServer
* ammonite runClient
import $ivy.`io.catbird::catbird-finagle:21.8.0`
import $ivy.`com.twitter::finagle-mux:21.8.0`
vic / gist:1f2dc6201cbe55b358c9c29f2af39851
Created Jul 1, 2020
Mill not generating sourcemaps when using scalajs >= 1.
View gist:1f2dc6201cbe55b358c9c29f2af39851
❯ ./mill scalajslib.test 'mill.scalajslib.HelloJSWorldTests.fastOpt'
[94/356] scalajslib.worker[1].compile
[info] Compiling 1 Scala source to /h/mill/out/scalajslib/worker/1/compile/dest/classes ...
[warn] 1 deprecation (since 2.13.0); re-run with -deprecation for details
[warn] one warning found
[info] Done compiling.
[221/356] main.core.compile
[info] Compiling 1 Scala source to /h/mill/out/main/core/compile/dest/classes ...
[info] Done compiling.
[356/356] scalajslib.test.test

Keybase proof

I hereby claim:

  • I am vic on github.
  • I am oeiuwq ( on keybase.
  • I have a public key ASDl3QUhn_Iv58GAMXdWpgBTMfK7AB_NVO7Kfd37fv2zPgo

To claim this, I am signing this object:

vic /
Last active Apr 3, 2018
Rebecca iterm2 colors

Install d12frosted/emacs-plus on mac patched for rich colors on terminals supporting direct color (like iterm2).

brew install emacs-plus --with-24bit-color

Generate the terminfo (see attached .src file)

Then run emacs/emacsclient with TERM set to xterm-24bits

vic /
Last active Feb 2, 2018
Save a YouTube list as a playlist of videos.
#!/usr/bin/env bash
# - Save a YouTube list as a playlist of videos.
# Doesnt actually download the videos, it just creates a playlist file `.pls` containing each video url.
# You can open such files with VLC or other media player on desktop and mobile.
View type.yaml
View def_guard.ex
defmodule DefGuard do
defp defguardp(defwith, name, meta = [{:when, _}, {:args, args} | _]) do
meta = meta |> Macro.escape
quote do
@expects {unquote(name), unquote(meta)}
unquote(defwith)(unquote(:"#{name}?")(unquote_splicing(args))) do
values = unquote(args |> value = {name, _, nil} -> {name, value} end))
unquote(meta[:when]) |> Macro.prewalk(fn
{name, _, nil} -> Keyword.get(values, name)
vic / compile.log
Created Dec 18, 2016
proof-general warnings on coq-layer installation
View compile.log
Leaving directory ‘/Users/vic/.emacs.d/elpa/proof-general-20161216.202’
Compiling file /Users/vic/.emacs.d/elpa/proof-general-20161216.202/acl2/acl2.el at Sun Dec 18 17:00:39 2016
Entering directory ‘/Users/vic/.emacs.d/elpa/proof-general-20161216.202/acl2/’
Leaving directory ‘/Users/vic/.emacs.d/elpa/proof-general-20161216.202/acl2/’
Compiling file /Users/vic/.emacs.d/elpa/proof-general-20161216.202/ccc/ccc.el at Sun Dec 18 17:00:39 2016
Entering directory ‘/Users/vic/.emacs.d/elpa/proof-general-20161216.202/ccc/’
Leaving directory ‘/Users/vic/.emacs.d/elpa/proof-general-20161216.202/ccc/’
View macro.ex
defmodule Absinthe.Schema.Notation.Macro do
defmacro macro_field(name, a, b) do
macro(:field, [name, a, b])
defmacro macro_object(name, a) do
macro(:object, [name, a])
vic /
Last active Dec 9, 2016
Display elixir exceptions / mix test / credo as iTerm2 notifications.

Open your iTerm2 preferences, then under Profiles / Advanced / Triggers add some regular expressions for the errors you want to notify. On Action select Post Notification, if the regex has group captures, you can use them as parameters.

FunTip: Under Action select Run Command with parameters: say "\1"

ProTip: mix test --listen-on-stdin will re-run tests when you hit enter. Others like to use the mix_test_watch package, but I prefer not to add another dependency.