Skip to content

Instantly share code, notes, and snippets.

View lxhom's full-sized avatar
🦀
fighting with the borrow checker

lxhom lxhom

🦀
fighting with the borrow checker
  • Germany
  • 22:31 (UTC +02:00)
View GitHub Profile
@motorailgun
motorailgun / idea.md
Last active June 18, 2024 06:22
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@lxhom
lxhom / twitterbot.js
Created April 29, 2021 16:39
multi-purpose twitter bot
// before using this code: replace all instances of [#...] with your keys/data/whatever and read comments starting with //#
// you can either host this on deta.sh or locally.
// to host it on deta.sh:
// [edit this code]; npm init; npm i twit axios deta express login-with-twitter; deta login; deta create .; deta deploy; deta cron set "1 minute"
const Twit = require('twit');
const axios = require("axios");
const {App} = require('deta'); //# remove this if youre running it locally
const express = require('express');
const lwt = require("login-with-twitter");
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active June 28, 2024 20:21
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@Locoxella
Locoxella / mingw-sshd.sh
Last active May 8, 2024 01:54
Enable sshd on MinGW
#!/bin/bash
#
# Configure sshd on MinGW for Windows
# Create host keys
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
@inecmc
inecmc / notes.md
Created August 4, 2017 08:06
How to run multiple Redis instances on Ubuntu 16.04

Create the directory for the new instance

$ sudo install -o redis -g redis -d /var/lib/redis2

Create a new configuration file

$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?