Skip to content

Instantly share code, notes, and snippets.

@bodrick
bodrick / config.json
Created December 23, 2023 22:08
MeshCentral configuration file schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "MeshCentral configuration file schema",
"id": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
"properties": {
"domaindefaults": {
"$ref": "#/properties/domains/items"
},
"domains": {
"items": {
@bodrick
bodrick / parse-vscode-profile.js
Created May 23, 2023 14:40 — forked from zachhardesty7/parse-vscode-profile.js
parse VSCode `.code-profile` for enabled extensions
// run like this:
// node ./parse-vscode-profile.js "$HOME"/Downloads/profile.code-profile
const fs = require("fs")
const file = fs.openSync(process.argv[2], "r")
for (const line of fs.readFileSync(file, "utf8").split("\n")) {
const extensions = JSON.parse(JSON.parse(line).extensions)
const enabledExtensions = extensions.filter((extension) => !extension.disabled)
@bodrick
bodrick / DownloadEsBuild.ps1
Created August 18, 2021 17:34
Download EsBuild Manually with Powershell
function Expand-TarBall
{
<#
.SYNOPSIS
Extract the specified tarball to a directory.
.DESCRIPTION
Extract the specified tarball to a directory.
Using the following C# from ForeverZer0:
@bodrick
bodrick / gist:19b07e5faf6379c8cb62b8d32c30b6e1
Created April 26, 2021 15:40
Reinstall VSCode extensions
Dump extensions:
code --list-extensions > extensions.txt
Install extensions with Bash (Linux, OS X and WSL):
cat extensions.txt | xargs -L 1 code --install-extension
Install extensions on Windows with PowerShell:
cat extensions.txt |% { code --install-extension $_}
@bodrick
bodrick / datatables.js
Last active June 11, 2024 22:07
esbuild and datatables.net
import $ from 'jquery'
window.jQuery = window.$ = $
import JSZip from 'jszip'
window.JSZip = JSZip
import 'pdfmake'
import dataTable from 'datatables.net-bs4'
dataTable(window, $)
import buttons from 'datatables.net-buttons-bs4'
buttons(window, $)
import columnVisibility from 'datatables.net-buttons/js/buttons.colVis.js'