Skip to content

Instantly share code, notes, and snippets.

View josh-hemphill's full-sized avatar

Josh josh-hemphill

View GitHub Profile
@josh-hemphill
josh-hemphill / cockpit.desktop
Last active May 4, 2025 15:10
Cockpit Desktop .desktop file
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Cockpit Local
MimeType=x-scheme-handler/ssh
Exec=/usr/libexec/cockpit-desktop / %u
Icon=/usr/share/cockpit/branding/default/apple-touch-icon.png
StartupWMClass=cockpit-client
@josh-hemphill
josh-hemphill / pymod.mts
Created March 18, 2025 05:35
Provision raspberry pi with log2ram etc
/// <reference types="E:\\Share\\dev\\pnpm\\node_modules\\@types\\node" />
import { access, copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import { createInterface } from 'node:readline';
import { createWriteStream } from 'node:fs';
const DRIVE_LETTER = 'F:';
// Check for --u6143 flag to bypass prompt
const isU6143 = process.argv.includes('--u6143');
@josh-hemphill
josh-hemphill / .p10k.zsh
Last active November 5, 2024 23:42
PowerLevel10k config
# Generated by Powerlevel10k configuration wizard on 2024-09-04 at 21:43 PDT.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 04242.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
# 2 lines, solid, full frame, lightest-ornaments, compact, many icons, concise,
# transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
@josh-hemphill
josh-hemphill / exportService.hbs
Created September 29, 2023 05:29
Template (handlebars) files for creating vue `useFetch` bindings in openapi-typescript-codegen
import { type UseFetchOptions, useFetch } from 'src/vue/useFetchPolyfill.js';
import type { MaybeRefOrGetter } from '@vueuse/shared';
import { toValue } from '@vueuse/shared';
import { getRequestBody } from 'src/core/getRequestBody.js';
import { mergeHeaders } from 'src/core/mergeHeaders.js';
import { getHeaders } from 'src/core/utils.js';
import { getUrl } from 'src/core/getUrl.js';
{{#if imports}}
@josh-hemphill
josh-hemphill / !WingetCollections.txt
Last active January 25, 2022 03:23
winget software
create
dev
diagnostics
gaming
init
office
@josh-hemphill
josh-hemphill / zip-extensions.js
Created November 2, 2021 01:17
node zip files
// require modules
const fs = require('fs')
const path = require('path')
const archiver = require('archiver')
const IS_CI = !!(process.env.CIRCLECI || process.env.GITHUB_ACTIONS)
const ProgressBar = !IS_CI ? require('progress') : {}
const readDirGlob = !IS_CI ? require('readdir-glob') : {}
const INCLUDE_GLOBS = [
'build/**',
import { parse } from "https://deno.land/[email protected]/flags/mod.ts";
const HELP_TEXT = `
usage: this-file <steam username> <target steam library directory> [--no-verify]
usage (as script): deno run -A ./update-verify.ts <steam username> <target steam library directory> [--no-verify]
You can alternatively specify <username> and <library> with any alias. e.g.
-u <username>
--user <username>
--username <username>
--user=<username>
{
"prettier.enable": false,
"typescript.preferences.importModuleSpecifierEnding": "js",
"workbench.editor.tabSizing": "fit",
"workbench.editor.decorations.colors": true,
"workbench.editor.wrapTabs": true,
"synthwave84.disableGlow": true,
"scm.alwaysShowActions": true,
"scm.alwaysShowRepositories": true,
"editor.suggestSelection": "first",
@josh-hemphill
josh-hemphill / example.md
Created June 10, 2021 15:01
VSCode launch to ssh remote
code --folder-uri "vscode-remote://ssh-remote+remote_server_goes_here/folder/on/remote/host/here
@josh-hemphill
josh-hemphill / v2.4.1.json
Last active May 25, 2021 18:38
Caddy Json Schema for VSCode
{
"title": "Caddy v2 autogenerated JSON schema \nhttps://github.com/abiosoft/caddy-json-schema",
"description": ": object\nhttps://pkg.go.dev/github.com/caddyserver/caddy/v2#Config\nConfig is the top (or beginning) of the Caddy configuration structure.\nCaddy config is expressed natively as a JSON document. If you prefer\nnot to work with JSON directly, there are [many config adapters](/docs/config-adapters)\navailable that can convert various inputs into Caddy JSON.\n\nMany parts of this config are extensible through the use of Caddy modules.\nFields which have a json.RawMessage type and which appear as dots (•••) in\nthe online docs can be fulfilled by modules in a certain module\nnamespace. The docs show which modules can be used in a given place.\n\nWhenever a module is used, its name must be given either inline as part of\nthe module, or as the key to the module's value. The docs will make it clear\nwhich to use.\n\nGenerally, all config settings are optional, as it is Caddy convention to\nhave good