Skip to content

Instantly share code, notes, and snippets.

@sigboe
sigboe / suspend-modules
Last active April 16, 2024 03:57 — forked from mauron85/suspend-modules
Systemd unload modules on sleep
#!/bin/bash
# Put into /lib/systemd/system-sleep/suspend-modules
# chmod a+x /lib/systemd/system-sleep/suspend-modules
# Unloads kernel modules defined in /etc/suspend-modules.d/*.conf
# and /etc/suspend-modules
# with one module per line
# Too see credits, see git history
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons

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?

@heroheman
heroheman / ranger-cheatsheet.md
Last active April 16, 2024 03:54
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@fworks
fworks / install-zsh-windows-git-bash.md
Last active April 16, 2024 03:53
Zsh / Oh-my-zsh on Windows Git Bash
@rxaviers
rxaviers / gist:7360908
Last active April 16, 2024 03:50
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@jfarmer
jfarmer / 01-truthy-and-falsey-ruby.md
Last active April 16, 2024 03:40
True and False vs. "Truthy" and "Falsey" (or "Falsy") in Ruby, Python, and JavaScript

true and false vs. "truthy" and "falsey" (or "falsy") in Ruby, Python, and JavaScript

Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true and false. In Python, for example, they're written as True and False. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).

This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.

If you want to use or share this material, please see the license file, below.

Update

@Bilka2
Bilka2 / Data.raw 1.1.91
Last active April 16, 2024 03:40
Dump of Factorio's vanilla prototype data created with https://mods.factorio.com/mod/DataRawSerpent
This file has been truncated, but you can view the full file.
Script @__DataRawSerpent__/data-final-fixes.lua:1: {
accumulator = {
accumulator = {
charge_animation = {
layers = {
{
layers = {
{
animation_speed = 0.5,
@jdnichollsc
jdnichollsc / ABC.md
Last active April 16, 2024 03:40
The Job Interview Guide

The Job Interview Guide πŸ’Ό

And English is a Work in Progress βŒ›

@sw4k
sw4k / install-docker-qubes.md
Last active April 16, 2024 03:34
Install Docker on Qubes OS 4.2

Install Docker on Qubes OS 4.2

The primary reason to change the data directory for docker to the home directory for user is to have persistence across AppVM restarts. The secondary reason is to work around permission issues.

Here we provide "the Qubes way" of solving for both that does not leave "bind-dirs" nor "docker" in a broken state.

Step 1: TemplateVM - Perform installation of docker via your package manager, and ensure services are disabled

sudo apt install -y docker.io