Skip to content

Instantly share code, notes, and snippets.

View haku's full-sized avatar

Fae haku

View GitHub Profile
@x-magic
x-magic / proxmox_pushover_webhook.md
Created February 23, 2025 15:09
Setup Pushover notification for Proxmox via webhook

To setup Pushover.net notification in Proxmox VE, go to:
Datacenter -> Notifications -> Notification Targets -> Add -> Webhook

Set up the following fields:

  • Endpoint Name: pushover (or whatever you want, note the character limitation)
  • Method/URL: POST, https://api.pushover.net/1/messages.json
  • Headers: Add one set of key-value pairs:
    • Content-Type -> application/json
  • Body:: See pushover_proxmox-notification-webhook.json file below
  • Secrets: Add two sets of key-value pairs:
@rauchg
rauchg / README.md
Last active May 16, 2026 01:17
require-from-twitter
First, a script to ensure tmux is running how we like it:
$ cat start-tmux
#!/bin/bash
if ! tmux has-session -t irssi >/dev/null 2>&1 ; then
tmux -2 new-session -d -n irssi -s irssi irssi
fi
if ! tmux has-session -t irssi; then
@sfan5
sfan5 / image2xterm.py
Last active July 13, 2020 18:24
Converts images into color sequences (xterm-256color)
#!/usr/bin/env python3
import sys
import getopt
from PIL import Image
xterm256colors = [ # http://pln.jonas.me/xterm-colors
(0, (0x00, 0x00, 0x00)), # SYSTEM
(1, (0x80, 0x00, 0x00)), # SYSTEM
(2, (0x00, 0x80, 0x00)), # SYSTEM
(3, (0x80, 0x80, 0x00)), # SYSTEM
@aphyr
aphyr / gist:6266347
Last active December 21, 2015 06:48
In this ZK demo, a partition places the primary on the minority component. All
operations time out while the cluster converges on a new primary, at which
point three clients (talking to the three nodes in the majority component) can
proceed again. When the partition is healed, the two minority nodes can begin
accepting writes again. As with single-node Postgres, Zookeeper's client
protocol and ZAB both allow for false negatives (timeouts may actually succeed)
but not false positives (every successful write *will* be present in the final
set.)
HOW TO READ THIS CHART:
@tychobrailleur
tychobrailleur / gist:5712504
Last active July 11, 2020 17:23
Capybara/Selenium/Firefox/Proxy.
require 'capybara/firebug'
# Disable Webmock if needed.
WebMock.disable_net_connect!(allow_localhost: true)
# Same thing for VCR if it has been imported somewhere.
VCR.configure do |c|
c.ignore_localhost = true
end
ENV['NO_PROXY'] = ENV['no_proxy'] = '127.0.0.1'
anonymous
anonymous / Jira_5_-_no_stalker.user.js
Created May 14, 2013 09:42
Remove the "stalker" behaviour from Jira 5 ticket pages
// ==UserScript==
// @name Jira 5 - no stalker
// @namespace http://djce.org.uk/greasemonkey
// @include https://jira.dev.bbc.co.uk/browse/*
// @version 1
// @grant none
// ==/UserScript==
try {
@PetrGlad
PetrGlad / run-java
Created August 18, 2012 10:32
Enable java remote debugger (JDWP, openjdk)
java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n ClassName
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@excalq
excalq / tmux-window-keys.sh
Created July 23, 2012 16:55
Using Back/Forward Mouse/Keyboard media keys to change Tmux/Screen Windows
# These two shortcuts allow your media keyboard or mouse's back/forward keys to change windows in screen.
# This is designed to work with tmux or screen (using ctrl+a as the command shortcut) inside a Guake terminal
# You'll also need xdotool installed (aptitude install xdotool)
# Enter these as shortcuts in Ubuntu's "System Settings" > "Keyboard" > "Shortcuts" (tab) > "Custom Shortcuts"
# Previous/Back Key
xdotool search --onlyvisible --name Guake key ctrl+a p
# Next/Forward Key
xdotool search --onlyvisible --name Guake key ctrl+a n