Skip to content

Instantly share code, notes, and snippets.

View piyoki's full-sized avatar
🧬
Linux DNA.

kev piyoki

🧬
Linux DNA.
  • /dev/null
View GitHub Profile
@rafi
rafi / dunstrc
Created September 15, 2013 21:13
dunst configuration file
[global]
font = EnvyCodeR 10
# allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough<s/>
# <u>underline</u>
#
# for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
@mattdenner
mattdenner / README.markdown
Last active July 30, 2025 07:25
Suspend and then hibernate after 60 minutes

I found a post about suspending and then going into hibernate that included a really clever script. Turns out that with NixOS this is even esaier to coordinate as you have systemd so can have a before and after service. I just include this in my /etc/nixos/configuration.nix file and nixos-rebuild; then a systemctl suspend or a close of the lid will cause the hibernate timer to be set.

@keithmorris
keithmorris / drive-format-ubuntu.md
Last active July 23, 2025 08:14
Partition, format, and mount a drive on Ubuntu
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 10, 2025 14:02
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@oprypin
oprypin / instructions.md
Last active May 8, 2025 01:05
systemd user unit + timer example

Save these files as ~/.config/systemd/user/some-service-name.*

Run this now and after any modifications: systemctl --user daemon-reload

Try out the service (oneshot): systemctl --user start some-service-name

Check logs if something is wrong: journalctl -u --user-unit some-service-name

Start the timer after this user logs in: systemctl --user enable --now some-service-name.timer

@lizrice
lizrice / kubelet-api.md
Last active June 26, 2025 12:39
Checking Kubelet API access

Accessing Kubelet API

curl -sk https://localhost:10250/pods/
  • If --anonymous-auth is turned off, you will see a 401 Unauthorized response.
  • If --anonymous-auth is true and --authorization-mode is Webhook you'll see 403 Forbidden response with message Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy)
  • If --anonymous-auth is true and --authorization-mode is AlwaysAllow you'll see a list of pods.
@erbrito
erbrito / regex_test.yml
Created April 9, 2019 20:37
Ansible example to use regex_search filter.
---
## Example of use of filter regex_search
- hosts: localhost
remote_user: root
tasks:
- name: set regex
set_fact:
az_rg_regex_pattern: "(?<=resourceGroups\/)(.*?)(?=\/)"
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active August 7, 2025 11:25
Ubuntu and Debian Cloud images in Proxmox
@brasey
brasey / Configure systemd-resolved to use a specific DNS nameserver for a given domain.md
Created October 25, 2019 14:38
Configure systemd-resolved to use a specific DNS nameserver for a given domain

Configure systemd-resolved to use a specific DNS nameserver for a given domain

Use case

Given

  • I use a VPN to connect to my work network
  • I'm on a Linux computer that uses systemd-resolved
  • I have a work domain called example.com
  • example.com is hosted by both public and private DNS nameservers
@aw
aw / explain.md
Last active July 10, 2025 12:29
[SOLVED] Proxmox VE and cloud-init snippets etc

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)