Skip to content

Instantly share code, notes, and snippets.

View archii's full-sized avatar
🌻
I may be slow to respond.

Archie Harris archii

🌻
I may be slow to respond.
View GitHub Profile
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active September 26, 2025 13:26
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,

#! /bin/env python
import sys
import crypt
ptpasswd=sys.argv[1]
print(crypt.crypt(ptpasswd, "$6$" + crypt.mksalt()))
@nop-90
nop-90 / agent.conf
Created February 16, 2017 21:20
Logstash Ulogd example configuration
input {
file {
type => "rasp"
path => "/etc/logstash/data/ulogd_rasp.json"
codec => "json"
start_position => "beginning"
sincedb_path => "/dev/null"
}
file {
type => "msi"

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@leonardofed
leonardofed / README.md
Last active October 11, 2025 06:04
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@bishboria
bishboria / springer-free-maths-books.md
Last active September 25, 2025 06:28
Springer made a bunch of books available for free, these were the direct links
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@wmealing
wmealing / C-states.md
Last active October 8, 2025 11:12
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@daviddavis
daviddavis / puppet.mkd
Created May 30, 2014 14:02
Guide to importing puppet modules into Katello

There are three ways to get puppet modules into Katello. The third way supports git.

  1. By creating a repo with its URL set to a puppet forge. This can be http://forge.puppetlabs.com for example. There must be an API there (e.g. http://forge.puppetlabs.com/modules.json?q=rvm). You can also use a tool like https://github.com/drrb/puppet-library to setup your own forge.
  2. By uploading modules. You can even create a repo with no URL and just upload your puppet modules via the URL. To upload modules, go to the repo details screen and see the module upload section.
  3. By using the pulp puppet module builder tool. See their documentation for more information. The script comes with Katello. For the repo URL, simply enter the filesystem path (e.g. "file://opt/puppet/modules").