Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
@jperkin
jperkin / netbsd-triton.md
Last active October 18, 2021 16:44
Generate NetBSD Triton Images

Creating NetBSD Bhyve/KVM images suitable for running in Triton.

Create Install VM

Create the VM json:

{
  "brand": "bhyve",
 "alias": "netbsd-install",
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
@igemnace
igemnace / rofi-pass
Last active December 20, 2023 21:32
Rofi script to find a password from password-store and copy it to clipboard.
#!/usr/bin/env bash
cd "$HOME/.password-store" || exit 1
pass_name=$(fd --type file --exec echo '{.}' | rofi -dmenu -i -p "pass")
[[ -n $pass_name ]] || exit 1
if pass show -c "$pass_name"; then
notify-send --urgency=normal "$pass_name" "Password copied to clipboard!"
fi
@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 24, 2024 15:20
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
diff --git a/filesystems/ipfs/DESCR b/filesystems/ipfs/DESCR
new file mode 100644
index 0000000..ebf0d67
--- /dev/null
+++ b/filesystems/ipfs/DESCR
@@ -0,0 +1,5 @@
+Ipfs is a global, versioned, peer-to-peer filesystem. It combines good ideas
+from Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single
+bittorrent swarm, exchanging git objects. IPFS provides an interface as simple
+as the HTTP web, but with permanence built in. You can also mount the world
@drscream
drscream / bash_completion_vdz
Created July 17, 2015 09:30
Small hack and workaround to provide some small deploy zone build virtual environment on your local bash environment
# ~/.bash_completion.d/vdz
_vdz() {
local cur
local envs=$( cat ~/.dz/env.json | jq -r '.environments | keys[]' )
cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=( $(compgen -W "${envs} --deactivate" -- ${cur}) )
}
complete -F _vdz vdz
@renoirb
renoirb / 0-STATE-RUN-SALT-API-GITHUB-HOOK-USE-CASE.md
Last active May 4, 2018 13:31
State runner on salt-api POST from GitHub push hook

Validate and run a state when a valid GitHub hook call has been received from salt-api

Idea is that we can setup salt-api to receive hook call from GitHub, and configured run stat.sls only if the request HMAC signature matche is successful.

Unfortunately most documentation says to deactivate salt-api hooks authentication (i.e. webhook_disable_auth: True) which is not a good idea.

This Gist is about finding a way to declare which state to run based on data GitHub sends on push hook. But ONLY if the request is valid.

Skeleton defines desired logic, see reactor_github_push.py below.

@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}

Notes

Architectures/ISAs

I believe that no illumos distributions modify uname -srmpio, meaning that for all distributions this will be:

% uname -srmpio
SunOS 5.11 i86pc i386 i86pc Solaris
input {
file {
path => "/path/to/exim/mainlog"
start_position => 'beginning'
sincedb_path => "/dev/null"
}
# udp {
# port => 5000
# type => syslog
# }