Skip to content

Instantly share code, notes, and snippets.

@lorin
lorin / preseed-fragment.seed
Last active May 8, 2024 13:43
Automated partitioning with Ubuntu preseed
# Use LVM for partitioning
d-i partman-auto/method string lvm
# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. Preseed this away
d-i partman-lvm/device_remove_lvm boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 8, 2024 13:41
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@wxingheng
wxingheng / mac os下vscode快捷键
Created October 7, 2018 15:03
mac os下vscode快捷键
[mac os下vscode快捷键](https://www.cnblogs.com/informatics/p/8315339.html)
全局
Command + Shift + P / F1 显示命令面板
Command + P 快速打开
Command + Shift + N 打开新窗口
Command + W 关闭窗口
基本
Command + X 剪切(未选中文本的情况下,剪切光标所在行)
Command + C 复制(未选中文本的情况下,复制光标所在行)
@gizmaa
gizmaa / Plot_Examples.md
Last active May 8, 2024 13:38
Various Julia plotting examples using PyPlot
@Derpidoo
Derpidoo / led_strip_controller_44button_remote_protocol.txt
Last active May 8, 2024 13:37
RGB LED Strip Controller 44 Button IR Remote Codes
RGB LED Strip Controller w/44 Button IR Remote Protocol
E.g. https://www.amazon.com/Flexible-Changing-Non-Waterproof-Controller-Included/dp/B01EWBZW0A/
"Hue hue hue" -you, after saving hundreds on your smart lighting
IR Wavelength: 940nm
Code Type: NEC
Code Length: 32 bit
## Function Code
===.====================.=======
@aphyr
aphyr / minikanren.pl
Created October 12, 2020 22:10
Minikanren in Lisp in Prolog
:- use_module(library(pairs)).
:- use_module(library(reif)).
not_in_list(K, L) :-
if_((L = []),
true,
([X | More] = L,
dif(K, X),
not_in_list(K, More))).
@mbinna
mbinna / effective_modern_cmake.md
Last active May 8, 2024 13:34
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@axzxc1236
axzxc1236 / USB_ZFS_auto_mount.MD
Last active May 8, 2024 13:33
How to mount ZFS pools thats on USB drives automatically.

I know there are a lot of tutorials on mounting ZFS automatically already, but that didn't work for me.

My situation:
I have a USB DAS(Direct-Attached Storage) that is connected to my NAS.

Why didn't the tutorials on the internet worked for me:
Systemd service files that comes with ZFS won't wait for USB devices.

Solution:
Create a service that can wait for my DAS to be recognized by Linux and then mount my ZFS pool.

Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4