Skip to content

Instantly share code, notes, and snippets.

View sebw's full-sized avatar
🤠

Sebastien Wains sebw

🤠
View GitHub Profile
@vernondcole
vernondcole / restart_your_minion.sls
Last active March 28, 2023 20:43
SaltStack state to restart a minion (using the minion you are restarting)
---
# salt state file for restarting a minion under its own control
{% set delay = salt['config.get']('minion_restart_in_seconds', 5) %}
restart-the-minion:
file.managed:
- name: /tmp/run_command_later.py
- source: salt://run_command_later.py
- mode: 775
@0XDE57
0XDE57 / config.md
Last active May 30, 2024 19:04
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@shamil
shamil / mount_qcow2.md
Last active June 17, 2024 07:47
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@dvdsmpsn
dvdsmpsn / bookmarklet.6music.js
Last active July 10, 2018 13:17
Bookmarklets for browsers
// Opens a small Radio 6 Music window just like the "Listen Live" link here -- https://www.bbc.co.uk/6music
// To "compile", URL encode everything after "javascript:"
// using http://meyerweb.com/eric/tools/dencoder/
// Source:
javascript:(function(){
window.open('https://www.bbc.co.uk/radio/play/live:bbc_6music', 'player6music', 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=380,height=685');
})();
#!/bin/bash
# /usr/local/bin/clone-prep
# vanilla-sl6.khresear.ch
#
# Clone preparation script
#
# Do not run if this machine is still named Vailla
if [ "$(hostname)" == "vanilla-sl6.khresear.ch" ]
then