Skip to content

Instantly share code, notes, and snippets.

@cerebrate
cerebrate / .config
Last active October 12, 2023 12:32
config file for kernel 6.1.0-rc6 under WSL
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.1.0-rc6 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 12.2.0-9) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23900
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.62.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 12.2.0-1) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23890
@tatumroaquin
tatumroaquin / archlinux-qemu-kvm.md
Last active July 3, 2025 10:55
QEMU-KVM Installation for Arch Linux

QEMU-KVM in Arch Linux

Check Virtualization Support

lscpu | grep -i Virtualization
  • VT-x for Intel
  • AMD-Vi for AMD

Ensure that your kernel includes KVM modules

@cerebrate
cerebrate / .config
Created October 14, 2021 15:32
Kernel config for my custom WSL kernel 5.10.60.1
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.10.60.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-9) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_LD_VERSION=236010000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active November 9, 2024 23:03
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@charlie-x
charlie-x / gist:96a92aaaa04346bdf1fb4c3621f3e392
Created July 28, 2021 20:55
recompile wsl2 kernel, add modules and CAN modules + can utils.
mines ubuntu 20.04 based, WSL2
in windows
wsl --list -v
* Ubuntu-20.04 Stopped 2
in wsl
# the old update routine
sudo apt-get update -y
# add tools to build kernel, apologies if i missed anything as i already have a bunch of dev stuff setup
sudo apt-get install -y autoconf bison build-essential flex libelf-dev libncurses-dev libssl-dev libtool libudev-dev

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@CoreyMSchafer
CoreyMSchafer / YouTube-OAuth-Snippets
Created September 10, 2020 02:06
YouTube-OAuth-Snippets
# token.pickle stores the user's credentials from previously successful logins
if os.path.exists('token.pickle'):
print('Loading Credentials From File...')
with open('token.pickle', 'rb') as token:
credentials = pickle.load(token)
# Google's Request
from google.auth.transport.requests import Request
@mchubby
mchubby / Ansible-vault-id-script.md
Last active October 2, 2022 16:21
Trying to get Ansible --vault-id auto selection working
@maclarensg
maclarensg / Example.rb
Created September 7, 2018 14:40
[Ruby - Custom before and after call hooks] Snippet code of how to define and create custom hooks in Ruby #hooks #ruby
module Hooks
@@before_methods = []
@@after_methods = []
def before(*method_names, **actions)
# create a Module for preprend to exisitng class
to_prepend = Module.new do
method_names.each do |method|
@@before_methods << method
define_method(method) do |*args, &block|
send(actions[:do]) if @@before_methods.include? method