Skip to content

Instantly share code, notes, and snippets.

Batch Cheat Sheet

For more information on a specific command, type HELP command-name

Command Description
ASSOC Displays or modifies file extension associations.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
BCDEDIT Sets properties in boot database to control boot loading.
@mt7479
mt7479 / CorrectRecoveryPartitionSize.ps1
Last active May 6, 2024 02:45
Resize the recovery partition on Windows 10 Systems to save some space
<#
Correct the default UEFI partition layout created by ConfigMgr to save some disk space.
https://docs.microsoft.com/de-de/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions
## Notes:
* The recovery partition size for Windows 10 1703 needs to be at least 900 MB or the partition will ignored.
* Windows 10 1511 Winre.wim size: 313.009.179 Bytes
* Windows 10 1607 Winre.wim size: 324.995.101 Bytes
@igelado
igelado / photos.py
Created October 7, 2019 18:02
Python Script to Migrate Photos between Google Accounts
# You need to create a new project @ https://console.developers.google.com
# In the new project enable the Google Photos API
# And create a new OAuth2 credentials (you will need to setup a redirection page for this).
# Download the the new OAuth2 credentials as JSON file (e.g., migration.json)
# Start the migration process executing:
# $ python3 photos.py --fetch migration.json
# If the migration process fails (which it is quite likely to), you can restart it running:
# $ python3 photos.py migration.json
import argpase
@redmcg
redmcg / kubedf
Last active May 6, 2024 02:40
Bash script to show k8s PVC usage
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@abelcallejo
abelcallejo / README.md
Last active May 6, 2024 02:39
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@memchr
memchr / import_env
Created August 28, 2023 18:43
import_env
#!/usr/bin/env bash
set -e
[[ -n $HYPRLAND_DEBUG_CONF ]] && exit 0
USAGE="\
Import environment variables
Usgae: $0 <command>
Commands:
@wanlce
wanlce / emby.md
Last active May 6, 2024 02:38
Linux 下 Emby客户端破解教程

Linux 下 Emby客户端破解教程

emby 客户端是需要付费才能使用的, 市面上也有许多三方修改版或者用第三方客户端来绕过这个限制,但是基本都是移动端设置或windows,很少有关于 linux 版的客户端的,今天我来教大家自己动手,丰衣足食(通用版)

解锁前 Untitled

以下仅供个人研究使用

@tanaikech
tanaikech / submit.md
Last active May 6, 2024 02:34
Redeploying Web Apps without Changing URL of Web Apps for new IDE

Redeploying Web Apps without Changing URL of Web Apps for new IDE

At March 15, 2021, one endpoint is created for one deployment. Ref By this, when you redeploy "Web Apps", the endpoint is changed. Because the deployment ID is changed. It seems that this it the new specification. In this report, I would like to introduce the method for redeploying Web Apps without changing the URL of Web Apps for new IDE.

Deploy Web Apps

  1. Open "New deployment" dialog with "Deploy" -> "New deployment".

  2. Select "Web app" for "Select type".

@hidroh
hidroh / avd.sh
Last active May 6, 2024 02:31
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
emulator -netdelay none -netspeed full -avd $avd
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 02:31
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.