Skip to content

Instantly share code, notes, and snippets.

@ironchicken
ironchicken / clocktable-by-tag.el
Last active June 16, 2022 12:43 — forked from ffevotte/clocktable-by-tag.el
Emacs org-mode dynamic block similar to clocktable, but grouped by tagSee: http://stackoverflow.com/q/17353591/1225607
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
str))
(defun clocktable-by-tag/insert-tag (params)
(let ((tag (plist-get params :tags)))
(insert "|--\n")
(insert (format "| %s | *Tag time* |\n" tag))
@atheiman
atheiman / README.md
Last active December 20, 2023 17:26
Vault Kubernetes Auth Notes

Setting up Kubernetes auth backend on Vault. I did this by running Vault server in dev mode in minikube. Files referenced in the commands below are included as other files in this gist.

Run Vault server in the vault-ns namespace in minikube and expose it as a service

kubectl create namespace vault-ns
kubectl --namespace=vault-ns run vault --image=vault --port=8200 -- vault server -dev -dev-listen-address=0.0.0.0:8200 -dev-root-token-id=root-token
kubectl --namespace=vault-ns expose deployment vault --type=NodePort --port=80 --target-port=8200
minikube service --namespace vault-ns vault --url 
This file has been truncated, but you can view the full file.
# Hosts file generated at Tue May 31 18:46:48 CDT 2022
0.0.0.0 000001.net.daraz.com
0.0.0.0 0000rrrvvv.duckdns.org
0.0.0.0 000-038.net.daraz.com
0.0.0.0 0001.2waky.com
0.0.0.0 0001-qemu-deteministic-record-and-replay.net.daraz.com
0.0.0.0 000-221.net.daraz.com
0.0.0.0 0001.best
0.0.0.0 0005.net.zooplus.com
0.0.0.0 0001-cab8-4c8c-43de.reporo.net
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@Pulimet
Pulimet / AdbCommands
Last active May 3, 2024 10:59
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@mterwill
mterwill / USAGE.md
Last active February 16, 2024 09:23
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here
; Beginning of Time - 26 Oct 2016
2016/10/26 Opening Balance
Assets:Banking:Checking $2000.00
Assets:Banking:Savings $100.00
Equity:Opening
[Assets:Budget:Food] $100.00
[Assets:Budget:Rent] $1000.00
[Assets:Budget:Vacation] $200.00
[Assets:Budget:Gas] $50.00
@alces
alces / ansible_local_playbooks.md
Last active April 5, 2024 18:28
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@sethvargo
sethvargo / secret.rb
Created February 1, 2016 21:36
Example Chef extension to extract secrets from HashiCorp's Vault
# Please see the following blog post for more information:
#
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html
#
resource_name :vault_secret
property :path, String, name_property: true
property :destination, String