Skip to content

Instantly share code, notes, and snippets.

@cjyar
cjyar / mbr-to-gpt-uefi.md
Last active May 2, 2024 06:55
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda
@highstreeto
highstreeto / alacritty.yml
Last active September 25, 2023 15:55
My personal config for Alacritty
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active March 8, 2024 17:34
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@slahn
slahn / build.gradle
Created May 19, 2017 20:31
SWT and JFace with Gradle and Kotlin
group 'example'
version '1.0-SNAPSHOT'
buildscript {
ext {
kotlin_version = '1.1.2-2'
osgi_platform = 'win32.win32.x86_64'
swt_version = '3.105.3'
}
@mrknmc
mrknmc / shopping.sh
Last active June 1, 2023 02:30
ASDA Groceries parsing
#!/usr/bin/env bash
### This only works assuming that you have all the necessary cookies in ./cookies.txt.
### I use this plugin: https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg
### Execute as follows: ./shopping.sh ./cookies.txt output.csv
# get last order id
order_id=$(curl -s -b $1 'https://groceries.asda.com/api/order/view?showmultisave=true&showrefund=true&pagenum=1&pagesize=25&requestorigin=gi' | jq -r '.orders | .[0] | .orderId')
# get url for last order