Skip to content

Instantly share code, notes, and snippets.

@reegnz
reegnz / README.md
Last active April 23, 2024 18:36
Implementing a jq REPL with fzf

Implementing a jq REPL with fzf

Update: I created jq-zsh-plugin that does this.

One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).

Another one of my favourite tools is fzf.

@jc00ke
jc00ke / install-vim8.txt
Last active January 23, 2020 19:41 — forked from opchaves/install-vim8.txt
Install Vim 8 with Python, Python 3, Ruby and Lua support on Regolith/Ubuntu 19.04
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 ~
name: Elixir CI
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
@ndbroadbent
ndbroadbent / getTotps - show image in console.js
Last active July 23, 2021 14:02 — forked from nmurthy/getTotps.js
export authy totp codes, show QR codes in the console
/* base32 */
/*
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@jc00ke
jc00ke / .projections.json
Created November 18, 2019 18:34 — forked from germsvel/.projections.json
Elixir/Phoenix basic projections
{
"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",
"end"
]
},
@dysinger
dysinger / nixos-encrypted-zfs.sh
Last active March 7, 2023 14:51
How I installed Encrypted ZFS root on NixOS
# MOVED HERE https://gist.github.com/dysinger/2a768db5b6e3b729ec898d7d4208add3
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
// Warning : this code just shows how a gif was made, it's not intended to be pedagogical, show good coding practices or be clever
int[][] result;
float t, c;
# from https://github.com/joerichsen/phoenix_live_view_example/blob/be9315feb30f377fb144b1b03b2f93f792bfbfa7/lib/demo_web/live/table_live.ex
defmodule DemoWeb.TableLive do
use Phoenix.LiveView
def render(assigns) do
~L"""
<form phx-change="search"><input type="text" name="query" value="<%= @query %>" placeholder="Search..." /></form>
<table>
<thead>
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 2, 2024 06:57
set -e, -u, -o, -x pipefail explanation
@jc00ke
jc00ke / install-2.3.1.md
Last active June 28, 2019 22:21
Install Ruby 2.3.1 on Manjaro Linux
$> sudo pacman -S gcc5 openssl-1.0
$> CC=gcc-5 CXX=g++-5 PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig/:/usr/lib/pkgconfig/RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr
/lib/openssl-1.0/ asdf install ruby 2.3.1

Detailed steps