This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-FileHash Win10_1709_German_x64.iso | |
aebb54dc736c84f75ba529910c082331fa5ee0c9b7502255183d795d4c65fbf3 Win10_1709_German_x64.iso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#ifdef _MSC_VER | |
/** | |
* implementation of clock_gettime(CLOCK_MONOTONIC, tv) from unistd.h for Windows | |
*/ | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// couldn't find this anywhere, so here you go | |
// it's ugly, you can clean it up | |
/** https://developer.android.com/google/play/billing/rtdn-reference */ | |
// TODO no one made typescript @types package for these? | |
interface CloudPubSubPublishMessage { | |
subscription: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://unix.stackexchange.com/questions/24419/terminal-autocomplete-cycle-through-suggestions | |
set show-all-if-ambiguous on | |
set show-all-if-unmodified on | |
set menu-complete-display-prefix on | |
"\t": menu-complete | |
"\e[Z": menu-complete-backward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add to inputrc | |
$include /etc/inputrc | |
# ^^ every ~/.inputrc should start like this | |
# then | |
set completion-ignore-case on | |
# OR | |
echo set completion-ignore-case on | sudo tee -a /etc/inputrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# add the following line to the end of ~/.bashrc | |
# adapted from https://unix.stackexchange.com/a/25725/266802 | |
# logs are created in ~ | |
test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f $HOME/$(date +"%Y-%m-%d_%H-%M-%S")_shell.log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use e.g. to derive | |
# INSTALL_DRIVE | |
# param for grub-install from the --efi-directory param | |
# $1 is e.g. /boot/efi | |
# then this will give you the current boot device | |
# note: grub-install creates device GUID specific boot config - will stop working when you assign new gpt partition guids | |
echo /dev/$(lsblk -no pkname $(df -P $1 | awk 'END{print $1}')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# see https://blogs.msdn.microsoft.com/commandline/2016/09/22/24-bit-color-in-the-windows-console | |
pushd /tmp | |
git clone https://github.com/bitcrazed/24bit-color | |
cd 24bit-color | |
rm *.md | |
chmod +x * | |
bash <(ls -1 | sed 's:^\(.*\):read -p "Press enter to run \1";./\1:') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script adds a program/script/command called 'permfunction' to you PATH | |
# permfunction allows you to write system-wide, on-PATH instantly available, persisted scripts, i.e. improved shell functions/aliases/abbreviations/short programs. | |
# | |
# TODO also persist these functions as gists for the user | |
# inspired by | |
# https://askubuntu.com/questions/1414/how-to-create-a-permanent-alias | |
# https://askubuntu.com/a/80290/521770 |
NewerOlder