Skip to content

Instantly share code, notes, and snippets.

View v3rse's full-sized avatar
💭
Reshaping the un1v3rse

Nana Ofosuhene Adane v3rse

💭
Reshaping the un1v3rse
View GitHub Profile
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution.md
Last active May 9, 2025 17:43
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,

@shortjared
shortjared / list.txt
Last active April 11, 2025 14:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com

Using chunkwm with khd on macOS High Sierra

To use chunkwm, you have to go to considerably more trouble than you will be used to if you are coming from the older (but very nice) kwm version 3. If you are coming from kwm 4, you are probably right at home.

Note: these instructions have now been added to the chunkwm wiki: https://github.com/koekeishiya/chunkwm/wiki/Instructions:-chunkwm-with-(s)khd-on-macOS-High-Sierra

Understanding the daemon and plugin concept

chunkwm is heavily modularised. It consists of a daemon, chunkwm, and a command-line control tool, chunkc. Neither will directly interact with the user: you need to use khd for that. chunkc is used to send commands to chunkwm, which is listening on a socket (and chunkc sends to that socket).

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Alambador
Alambador / linode-stackscript-centos-lemp-advanced
Created September 27, 2016 22:08 — forked from cballou/linode-stackscript-centos-lemp-advanced
An advanced Linode StackScript for deploying a CentOs 64bit LEMP Stack with a ton of extras and configuration: MySQL, Suhosin, Memcached, Monit, Supervisord, Gearman, Beanstalk, Fail2Ban, IPTables Firewall, SSH
#!/bin/bash
#
# MYSQL CONFIG
# ============
# <UDF name="db_password" Label="Choose a MySQL Root Password" />
# <UDF name="db_name" Label="MySQL - Database Name" default="" example="Optionally create this database." />
# <UDF name="db_user" Label="MySQL - Username" default="" example="Optionally create this user." />
# <UDF name="db_user_password" Label="MySQL - Password" default="" example="The user password." />
#
# OPTIONAL LIBRARIES TO INSTALL

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@ErikBean
ErikBean / fp.md
Created February 3, 2016 21:04
lodash fp docs
@bynaki
bynaki / 15162a5ecc4-f31f2321.md
Last active October 8, 2017 16:58
Chai - Installation - Node.js - Browser - Assertion Styles -

:origin:

Chai

Installation

Chai is available for both node.js and the browser using any test framework you like. There are also a number of other tools that include Chai.

Node.js

// Bonfire: Seek and Destroy
// Author: @v3rse
// Challenge: http://www.freecodecamp.com/challenges/bonfire-seek-and-destroy?solution=var%20currArg%3B%0A%2F%2Fclean%20code%0Afunction%20cleaner(val)%7B%0A%20%20%20%20%20%20return%20val%20!%3D%20currArg%3B%20%2F%2Fafter%20zero%0A%7D%0A%0Afunction%20destroyer(arr)%20%7B%0A%20%20%2F%2F%20Remove%20all%20the%20values%0A%20%20%2F%2Fget%20extra%20arguments%0A%20%20for(var%20i%20%3D%201%3B%20i%3Carguments.length%3B%20i%2B%2B)%7B%0A%20%20%20%20%20console.log(currArg%2B%22%3Abefore%20%22%2Barr)%3B%0A%20%20%20%20currArg%20%3D%20arguments%5Bi%5D%3B%0A%20%20%20%20arr%20%3D%20arr.filter(cleaner)%3B%0A%20%20%20%20console.log(currArg%2B%22%3Aafter%20%22%2Barr)%3B%0A%20%20%7D%0A%20%20return%20arr%3B%0A%7D%0A%0Adestroyer(%5B1%2C%202%2C%203%2C%201%2C%202%2C%203%5D%2C%202%2C%203)%3B%0A
// Learn to Code at Free Code Camp (www.freecodecamp.com)
var currArg;
//clean code
function cleaner(val){
return val != currArg; //after zero
}
// Bonfire: Falsy Bouncer
// Author: @v3rse
// Challenge: http://www.freecodecamp.com/challenges/bonfire-falsy-bouncer?solution=function%20bouncer(arr)%20%7B%0A%20%20%2F%2F%20Don%27t%20show%20a%20false%20ID%20to%20this%20bouncer.%0A%20%20return%20arr.filter(function(val)%7B%0A%20%20%20%20return%20%20Boolean(val)%3B%0A%20%20%7D)%3B%0A%7D%0A%0Abouncer(%5B7%2C%20%22ate%22%2C%20%22%22%2C%20false%2C%209%5D)%3B%0A
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function bouncer(arr) {
// Don't show a false ID to this bouncer.
return arr.filter(function(val){
return Boolean(val);
});