Skip to content

Instantly share code, notes, and snippets.

@liilac
liilac / updateMfHashes.ps1
Created November 3, 2020 03:45
PowerShell script to update file hashes in a .mf OVF manifest file, for all .ovf files in the current directory
# Updates the file file hashes in the OVF manifest for all .ovf files in the current directory
#
# Author: Lilac Kapul <[email protected]>
# Last updated: 2020-11-03
# License: MIT
#
# Copyright (c) 2020 Lilac Kapul
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#!/bin/sh
STATIC_NMAP_URL="https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/nmap"
BINDIR=$HOME/.local/bin
NMAP_OUT=$BINDIR/nmap
if [[ ! -d $BINDIR ]] ;
then
mkdir -p $BINDIR
@liilac
liilac / install_minecraft_arch.sh
Last active April 26, 2020 15:40
Installs the Minecraft Java Edition launcher to a user's home directory on Arch Linux
#!/bin/bash
# walk-through of quick installation of Minecraft on Arch Linux and derivatives
# make folders to install Minecraft files into
mkdir -p ~/.local/opt ~/.local/share/applications ~/.local/share/icons/svg
# download Minecraft launcher icon
wget -O ~/.local/share/icons/svg/minecraft-launcher.svg "https://launcher.mojang.com/download/minecraft-launcher.svg"
# download and install desktop shortcut I made
wget -O ~/.local/share/applications/minecraft-launcher.desktop "https://gist.github.com/liilac/15d4cd91d6dd40a4444542282a184733/raw/4018f681d9622cbc12014d5ce3210f5acad307dd/minecraft-launcher.desktop"
@liilac
liilac / minecraft-launcher.desktop
Created April 26, 2020 15:08
FreeDesktop desktop entry for Minecraft launcher installed on a GNU/Linux system under ~/.local/opt/
[Desktop Entry]
Type=Application
Version=1.0
Name=Minecraft Launcher
Comment=Official Minecraft Launcher
Exec=$HOME/.local/opt/minecraft-launcher/minecraft-launcher
Path=$HOME/.local/opt/minecraft-launcher/
Icon=minecraft-launcher
Terminal=false
Categories=Game;Application;
@liilac
liilac / Set_Keyboard_Layout.ps1
Created April 25, 2020 17:38
Powershell script to set keyboard layout, using most preferred language active on a system
# Sets the default input method for the user to Dvorak with the most-preferred
# locale currently active
# Author: Lilac Kapul <[email protected]>
# Copyright (c) 2020 Lilac Kapul
# License: MIT
#####################
# BEGIN PREFERENCES #
#####################
@liilac
liilac / ticket_line.py
Last active September 27, 2019 11:27
Sample solution
from collections import deque
# defines a type of "object", that represents a ticket-seeking visitor
class Visitor:
# stores how many tickets the visitor needs
needs = 0
# stores how many tickets the visitor has
has = 0
# defines method to create a new visitor
def __init__(self, needs):
@liilac
liilac / keybase.md
Created September 13, 2019 18:02
keybase proof

Keybase proof

I hereby claim:

  • I am liilac on github.
  • I am liolite (https://keybase.io/liolite) on keybase.
  • I have a public key ASCI1utjVh0MmkAyQRdv7tAd9f2iHkA-3rLIOG9dvrC1AQo

To claim this, I am signing this object:

@liilac
liilac / keybase.md
Created July 6, 2019 07:22
Keybase GitHub ownership claim

Keybase proof

I hereby claim:

  • I am liilac on github.
  • I am crylite (https://keybase.io/crylite) on keybase.
  • I have a public key ASCzw3UtOuKU-doxM6Pg6cbdg0rVi9jHyiTjD3_DKwQ0Vwo

To claim this, I am signing this object:

@liilac
liilac / gist:f042127cdfcb2834b363ba9209d35f14
Created April 11, 2019 16:43
Windows 10 PS Output for yarn add --dev @jsiebern/bs-material-ui-ppx
PS X:\path\to\project-dir> yarn add --dev @jsiebern/bs-material-ui-ppx
yarn add v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "bs-platform@^4.0.6".