Skip to content

Instantly share code, notes, and snippets.

View jkirk's full-sized avatar

Darshaka Pathirana jkirk

View GitHub Profile
@jkirk
jkirk / pedantically_commented_playbook.yml
Created September 24, 2015 06:59 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@jkirk
jkirk / cinnamon-screensaver-debug.txt
Last active July 15, 2017 23:31
cinnamon-screensaver does not lock screen / show no password prompt when user interface scaling is set to Hi-DPI
% cinnamon-screensaver --version
cinnamon-screensaver 3.4.1
% xrandr
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 8192 x 8192
LVDS1 connected (normal left inverted right x axis y axis)
1366x768 60.02 +
1360x768 59.80 59.96
1024x768 60.00
800x600 60.32 56.25
@jkirk
jkirk / hostnames.org
Last active June 11, 2018 00:58
A list of possible server hostnames, grouped by some random namespaces

FOSDEM 2018

This is my journal about FOSDEM 2018. It took place on 3rd and 4th of February 2018.

Homepage: https://fosdem.org/2018/

Talks

@jkirk
jkirk / firefox-addons
Last active December 21, 2019 15:36
Firefox Add-Ons / Extensions which should be installed in every Firefox profile
https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/
https://addons.mozilla.org/en-US/firefox/addon/copy-shorturl/
https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/
https://addons.mozilla.org/en-US/firefox/addon/open-tabs-next-to-current/
https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/
https://addons.mozilla.org/en-US/firefox/addon/tab-counter-webext/
https://addons.mozilla.org/en-US/firefox/addon/titleurlcopy/
https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
https://addons.mozilla.org/en-US/firefox/addon/shaarli/
@jkirk
jkirk / vim-cheatsheet.md
Created April 6, 2020 15:55 — forked from azadkuh/vim-cheatsheet.md
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@jkirk
jkirk / samba-list-expired-passwords.sh
Created July 5, 2021 21:38
List expired Samba domain account passwords
#!/bin/bash
# Inspired from: https://linux.samba.narkive.com/J6bwFGaF/samba-users-list-and-the-date-the-password-will-expire#post15
# Get path to sam.ldb
LDBDIR=$(samba -b | grep 'PRIVATE_DIR' | awk -F ':' '{print $NF}' | sed 's/^ *//g')
if [ -z "${LDBDIR}" ]; then
echo "This is supposed to be a DC, but cannot obtain the Private dir."
echo "Cannot Continue...Exiting."
exit 1
else
@jkirk
jkirk / ara_functions.md
Created November 23, 2021 20:05
ARA Records Ansible Functions

ARA Records Ansible Functions

.zshrc.local:

# ansible ara functions
function ara_playbooks() { ara playbook list --limit ${1:=10} }
function ara_playbooks_checkrun() { ara playbook list --label "check:True" --limit ${1:=10} }
function ara_playbooks_fullrun() { ara playbook list --label "check:True" --limit ${1:=10} }
function ara_last() { ara playbook list --limit 1 -c id -f value }
function ara_hosts_changed() { ara result list --playbook $1 --limit 100 --resolve -c id -c host --changed }