Skip to content

Instantly share code, notes, and snippets.

jc00ke / op-gpg
Created Sep 26, 2020
Import 1Password's GPG key on Ubuntu
View op-gpg
#!/usr/bin/env bash
# Necessary to use the MIT keyserver on Ubuntu 20.04/Regolith 1.4 with gpg
gpg --keyserver hkp:// --recv-keys 3FEF9748469ADBE15DA7CA80AC2D62742012EA22
View game.ex
def answer_question(%Game{current_question: current_question} = game, guess, user_name)
when is_binary(guess) do
|>, user_name)
|> answer_question(game, user_name)
defp answer_question(%Response{correct: true} = response, game, user_name) do
game =
View foo.ex
defmodule Foo do
def bar(:a, opts \\ []), do: :a
def bar(:b, opts \\ []), do: :b
jc00ke / gist:06fba53f3c8571c7bcbeb5de0e59be77
Created Mar 14, 2020
Convert MOV files to other formats
View gist:06fba53f3c8571c7bcbeb5de0e59be77
> ffmpeg -i -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 proj03.ogg
> ffmpeg -i -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis proj03.webm
> ffmpeg -i -vcodec h264 -acodec mp2 proj03.mp4
View arch-install
# Recommended steps:
# bootstrap before entering chroot
# copy this script into INSTALL_DIR
# rootinit after entering chroot
# x (if installing graphics)
# pkgs
# xpkgs (if installing graphics)
jc00ke / install-vim8.txt
Last active Jan 23, 2020 — forked from opchav/install-vim8.txt
Install Vim 8 with Python, Python 3, Ruby and Lua support on Regolith/Ubuntu 19.04
View install-vim8.txt
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
jc00ke / .projections.json
Created Nov 18, 2019 — forked from germsvel/.projections.json
Elixir/Phoenix basic projections
View .projections.json
"lib/**/views/*_view.ex": {
"type": "view",
"alternate": "test/{dirname}/views/{basename}_view_test.exs",
"template": [
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}View do",
" use {dirname|camelcase|capitalize}, :view",
jc00ke /
Created Jun 14, 2019 — forked from altercation/
arch-dual drive config
# Arch Linux Installation Script
# This installs, with no intervention (other than initial edit to change
# RAID array drive values), Arch Linux on an encrypted btrfs raid1 array.
set -eu
jc00ke / bulletproof_arch.txt
Created Jun 14, 2019 — forked from altercation/bulletproof_arch.txt
Bulletproof Arch - Minimal Clean Install
View bulletproof_arch.txt
These are working notes on the installation of Arch Linux. I've just completed this install on a notebook (Lenovo P50)
but the setup should work for most laptop/desktop configurations.
Some assumptions/notes:
1. This isn't a dual boot configuration. I can see some of the appeal and still work in Adobe from time to time, but given
the increasing complexity of EFI and the way Windows/MS manhandles the EFI partition during upgrades, I really would
recommend steering clear of dual boot. Just my two cents here.
2. We're encrypting with LUKS. I've used so-called "self encrypting drives" as well (and linux has multiple ways of dealing
View table_live.ex
# from
defmodule DemoWeb.TableLive do
use Phoenix.LiveView
def render(assigns) do
<form phx-change="search"><input type="text" name="query" value="<%= @query %>" placeholder="Search..." /></form>