Skip to content

Instantly share code, notes, and snippets.

View richies-dev's full-sized avatar

Richie Sikra richies-dev

View GitHub Profile
@wheelerlaw
wheelerlaw / elevate.sh
Last active September 29, 2023 16:22
Running elevated commands from a non-elevated git-bash with the ability to pipe/redirect the output of the elevated command.
#!/usr/bin/env bash
elevate() {
powershell -Command "Start-Process cmd -ArgumentList \"/c\",\"$1 2>&1 | clip\" -Verb RunAs"
powershell -sta "add-type -as System.Windows.Forms; [windows.forms.clipboard]::GetText()"
}
@parmentf
parmentf / GitCommitEmoji.md
Last active May 11, 2024 05:36
Git Commit message Emoji
@tylerneylon
tylerneylon / json.lua
Last active April 19, 2024 21:02
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.