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 August 19, 2024 14:13
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
#!/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 September 20, 2024 06:31
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@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 August 21, 2024 16:57
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