This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mode csv | |
-- import column names from first show | |
.headers on | |
-- show current settings | |
.show | |
.import transactions.csv transactions | |
select * from transactions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Pre gopls/lsp-mode/go-mode setup | |
;;; This section installs use-package from melpa if it isn't | |
;;; already installed. You can skip this if you already have use-package | |
;; enable melpa if it isn't enabled | |
(require 'package) | |
(when (not (assoc "melpa" package-archives)) | |
(setq package-archives (append '(("melpa" . "https://melpa.org/packages/")) package-archives))) | |
(package-initialize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun reformat-directory (dir) | |
"Reformat all files of extention in directory" | |
(interactive "D") | |
(let* ((ext ".go") | |
(ts) | |
(tmp-buffer) | |
;; disable find-file hooks to speed up processing: | |
;; don't run git commands on every file | |
(find-file-hook '()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# from https://www.joyfulbikeshedding.com/blog/2019-01-31-full-system-dynamic-tracing-on-linux-using-ebpf-and-bpftrace.html | |
apt-get install -y clang-7 libclang-7-dev llvm-7 llvm-7-dev | |
apt-get install -y bison cmake flex g++ git libelf-dev zlib1g-dev libfl-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COMM=$1 | |
if [ -z "$COMM"] ; then | |
echo "usage: $0 <name_of_process>" >&2 | |
exit 1 | |
fi | |
script='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y emacs25-nox git | |
wget https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz | |
sudo tar -xf go1.14.1.linux-amd64.tar.gz -C /opt/ | |
export PATH=/opt/go/bin:$HOME/go/bin:$PATH | |
GO111MODULE=on go get golang.org/x/tools/gopls@latest | |
git clone https://github.com/psanford/wormhole-william |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
let | |
unstable = import <nixos-unstable-small> { }; | |
in { | |
disabledModules = [ | |
"virtualisation/container-config.nix" | |
"virtualisation/containers.nix" | |
"virtualisation/podman.nix" | |
"virtualisation/nixos-containers.nix" | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -n "$1" | xclip -selection primary; notify-send "URL Copied" "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
if ARGV.length < 3 | |
STDERR.puts("usage: #{$0} 'line_match' <perf.script.file> <symbol_file>") | |
STDERR.puts("line_match is a string submatch for a line line:") | |
STDERR.puts | |
STDERR.puts(" 40b1c5 [unknown] (/usr/local/bin/foobar (deleted))") | |
STDERR.puts | |
STDERR.puts("symbol_file is the output of `objdump -Tt /path/to/executable`") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmp_name="$(tempfile)" | |
cp $@ $tmp_name | |
chmod 600 $tmp_name | |
echo "sha256:" | |
ssh-keygen -lv -E sha256 -f "$tmp_name" | |
echo "md5:" |