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
@echo off | |
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Mozilla Firefox\Mozilla Firefox.lnk" | |
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Word 2007.lnk" | |
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2007.lnk" | |
cscript PinItem.vbs /taskbar /item:"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office PowerPoint 2007.lnk" |
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
" I used to run call system('find ~/.vimbackup -mtime +14 -exec gvfs-trash "{}" \;') | |
" but now have created a more portable version since I work on Windows, Mac, & Linux. | |
set backup | |
set nowritebackup | |
set backupcopy=yes | |
set backupdir=$HOME/.vimbackup | |
set directory=$HOME/.vimswap,./ | |
" Timestamp the backups |
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
import { rollup, VERSION } from "https://cdn.jsdelivr.net/npm/rollup/+esm" | |
const basePath = (path) => { | |
const index = path.lastIndexOf("/") | |
return index != -1 ? path.slice(0, index) : "" | |
} | |
/** @param {NS} ns */ | |
const bitburnerResolve = (ns) => ({ | |
name: "BitburnerResolve", |
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
/** | |
* Patch a method on an instance. Returns a function which will undo the patch. | |
* | |
* Note: The function signature of the provided override does not match the | |
* original method. This is by design in order to create a more predictable | |
* function signature. | |
* | |
* @param {{ [x: string]: Function }} instance | |
* @param {keyof instance} method | |
* @param {(ctx: any, args: IArguments, original: Function) => any} override |
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
// Date objects frozen with `Object.freeze()` are still mutable due to the way | |
// JavaScript stores the internal value. You can create a truly immutable, | |
// "frozen" date object by wrapping it in a proxy which ignores set* functions. | |
const noop = () => {} | |
const dateProxyHandler = { | |
get(target, prop, receiver) { | |
if (prop === Symbol.toStringTag) return "Date" | |
if (typeof prop === "string" && prop.startsWith("set")) return noop |
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
const IS_PROD = process.env.NODE_ENV === "production" | |
/** @type {import("prettier").Options} */ | |
const prettierRc = { | |
arrowParens: "always", | |
endOfLine: "lf", | |
quoteProps: "consistent", | |
semi: false, | |
trailingComma: "es5", | |
} |
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/sh | |
## | |
# Mount my development websites folder | |
# | |
# NOTE: Because this uses Mac OS X mounting techniques, all mac format | |
# images are supported and many other UNIX filesystem formats. | |
# (My Development Sites image is stored encrypted.) | |
# Location of the image to be mounted | |
IMAGE="$HOME/Documents/Development Sites.sparsebundle" |
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
data:text/html;base64,PGh0bWwgbGFuZz0iZW4iPgo8aGVhZD4KCTxtZXRhIGNoYXJzZXQ9IlVURi04Ij4KCTx0aXRsZT5UcnkgSGFuZGxlYmFycy5qczwvdGl0bGU+Cgk8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL25vcm1hbGl6ZS81LjAuMC9ub3JtYWxpemUubWluLmNzcyI+Cgk8bGluayByZWw9J3N0eWxlc2hlZXQgcHJlZmV0Y2gnIGhyZWY9J2h0dHBzOi8vY2RuanMuY2xvdWRmbGFyZS5jb20vYWpheC9saWJzL3R3aXR0ZXItYm9vdHN0cmFwLzQuMC4wLWJldGEuMi9jc3MvYm9vdHN0cmFwLmNzcyc+Cgk8c3R5bGU+CglodG1sLGJvZHksI2FwcCwucm93IHsgaGVpZ2h0OiAxMDAlOyB9Cglib2R5IHsKCQliYWNrZ3JvdW5kLWNvbG9yOiAjMTExMzExOwoJCWNvbG9yOiAjZmZmZmZmOwoJfQoJLmVkaXRvcnMgPiAuZm9ybS1ncm91cCwKCS5wcmV2aWV3ID4gLmZvcm0tZ3JvdXAgewoJCWRpc3BsYXk6IC13ZWJraXQtYm94OwoJCWRpc3BsYXk6IC1tcy1mbGV4Ym94OwoJCWRpc3BsYXk6IGZsZXg7CgkJLXdlYmtpdC1ib3gtb3JpZW50OiB2ZXJ0aWNhbDsKCQktd2Via2l0LWJveC1kaXJlY3Rpb246IG5vcm1hbDsKCQktbXMtZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKCQlmbGV4LWRpcmVjdGlvbjogY29sdW1uOwoJCW1hcmdpbi1ib3R0b206IDA7Cgl9CgkuZWRpdG9ycyA+IC5mb3JtLWdyb3VwID4gLmFjZV9lZGl0b3IsCgkucHJldmlldyA+IC5mb3JtLWdyb3VwID4gLmFjZV |
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 | |
# Warn when `package.json` is changed between checkouts. | |
PREVIOUS_HEAD=$1 | |
NEW_HEAD=$2 | |
BRANCH_SWITCH=$3 | |
if [ $(git diff $PREVIOUS_HEAD..$NEW_HEAD --name-only -- package.json | wc -l) == "1" ]; then | |
echo "[post-checkout] \`package.json\` changed, running \`npm install --no-optional\`..." | |
npm install --no-optional |
NewerOlder