Skip to content

Instantly share code, notes, and snippets.

@Hashbrown777
Hashbrown777 / wslMount.ps1
Last active December 3, 2023 20:13
Attach one or more physical disks to a wsl instance, using encryption and formatting options `wsl --mount` doesn't support
<# calling the wslMount function will attach one or more physical disks to a wsl instance
-drives
This parameter specifies which disks, and is an array of what Windows calls the Friendly Name.
You can see these by calling `Get-PhysicalDisk`.
-count
The list of friendly names are not necessarily unique (eg if you have multiple of the same model of drive).
Count is required so that you know how many disks have been matched, and will be passed to WSL.
-wsl
The name of the wsl install you want to interact with, defaults to the default wsl instance.
-mount
@sindresorhus
sindresorhus / esm-package.md
Last active May 2, 2024 22:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@rufoa
rufoa / patch.sh
Last active February 2, 2024 06:41
sublime merge 2 build 2068 linux
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
target="${1:-/opt/sublime_merge/sublime_merge}"
check_sha() {
local sha_valid
printf '\00\00\00' | dd of=sublime_text bs=1 seek=290764 count=3 conv=notrunc
https://www.google.com/search?q=%22EA7E-890007%22
@jakub-frajt
jakub-frajt / Default.sublime-commands
Last active October 8, 2021 19:24
Sublime Merge custom commands
[
{
"caption": "Fixup",
"command": "git",
"args": {"argv": ["commit", "--fixup", "HEAD"]}
},
{
"caption": "Stage All",
"command": "git",
"args": {"argv": ["add", "."]}
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active April 25, 2024 04:03
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@jsidhu
jsidhu / gist:766e4e85193f89c94640495959eb5620
Created July 6, 2016 19:01
Curl post to zabbix api (api_jsonrpc.php)
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"myUserName","password":"myPassword"},"auth":null,"id":0}' https://zabbix-web.symcpe.net/api_jsonrpc.php
@bvanskiver
bvanskiver / shrew-soft-shortcut.bat
Last active March 14, 2023 07:25
Shrew Soft VPN client shortcut with saved credentials
rem http://www.shrew.net/
"C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a
@akora
akora / remove-diacritics-google-sheet
Created February 28, 2015 11:18
Removes all diacritics from strings (e.g. names) in a Google spreadsheet
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2,"ö","o"),"ü","u"),"ó","o"),"ő","o"),"ú","u"),"é","e"),"á","a"),"ű","u"),"í","i"),"Ö","O"),"Ü","U"),"Ó","O"),"Ő","O"),"Ú","U"),"É","E"),"Á","A"),"Ű","U"),"Í","I")