Skip to content

Instantly share code, notes, and snippets.

View Krellan's full-sized avatar

Josh Lehan Krellan

View GitHub Profile
@0xabad1dea
0xabad1dea / speedrunning-faq.md
Last active February 26, 2024 17:42
Speedrunning FAQ/Glossary

Speedrunning FAQ/Glossary

by 0xabad1dea September 2018

You may notice a decidedly Nintendo bias to the examples. I can't change who I am.

What is Speedrunning?

Speedrunning is:

  • Completing a video game
@scottopell
scottopell / fix_exfat_drive.md
Last active April 30, 2024 22:46
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
@Rambou
Rambou / gist:c6769caee19b0b9915d8342b86c3ef72
Last active June 13, 2022 09:39
Installing Nvidia propreatary drivers in Linux with UEFI enabled
If, like me, your are booting with UEFI (because having a triple boot ubuntu-windows-mac or because UEFI is the most modern type of bootloader and successor of EFI :p), you have to sign the proprietary modules each time they are recompiled (or upgrade kernel version) so that they are allowed to be loaded in the kernel.
1) Step one, create a self-signed certificate to sign nvidia driver:
sudo openssl req -new -x509 -newkey rsa:2048 -keyout UEFI.key -outform DER -out UEFI.der -nodes -days 36500 -subj "/CN=rambou_nvidia/"
2) step two load and store certificate in a supplementary key database MOC
sudo mokutil --import UEFI.der
3) step three reboot your system
At this step after reboot you will be prompted to select your certificate to import in in key database. If you have inserted a password at certificate creation you'll be prompted to insert it. If you are not prompted, you may have to enter the BIOS by using function keys at boot time.
@Krellan
Krellan / usbpower.pl
Last active October 7, 2022 22:53
This is a script that will reset a Linux USB serial tty device. Sometimes they get stuck with "unable to enable UART" error messages, this will help fix.
#!/usr/bin/perl -w
#
# USB Power
# Krellan
#
# This script will attempt to recover a misbehaving USB serial tty device,
# by unbinding/rebinding the USB hub(s) that are upstream from it.
# This should force the device to reset itself.
#
# Usage: usbpower.pl ttyUSB0
@dreness
dreness / btc-watcher.py
Last active December 21, 2015 04:09
Send email notifications of shares and blocks.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import time, os
import re
from email.mime.text import MIMEText
from subprocess import Popen, PIPE
from datetime import datetime, timedelta
# Watch the bitcoin log, send notifications of shares and blocks, with
@dooglus
dooglus / bootstrap.cpp
Created February 21, 2013 06:44
create bootstrap.dat from bitcoin-qt's blk0000?.dat files
// g++ UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o libcryptopp.a -o bootstrap.out -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS -lpthread bootstrap.cpp
#include "BlockUtils.h"
int main(void)
{
string btcdir("/home/chris/.bitcoin");
string bootstrap(btcdir + "/" + "bootstrap.dat");
BlockDataManager_FileRefs::GetInstance().SelectNetwork("Main");
BlockDataManager_FileRefs & bdm = BlockDataManager_FileRefs::GetInstance();
@coldnebo
coldnebo / Default (OSX).sublime-keymap -- User
Created February 3, 2012 16:21
Sublime Text 2 fix for OSX home/end keys
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }