Skip to content

Instantly share code, notes, and snippets.

@jimbrig
jimbrig / netgear-router-reboot.ps1
Created November 2, 2023 02:34 — forked from mark05e/netgear-router-reboot.ps1
NETGEAR Router DC112A reboot powershell script
#########################################################################
## NETGEAR Router DC112A reboot script
## Tested with Firmware: V1.0.0.18_1.0.60
## Mark 2020
#########################################################################
#-[Variables]------------------------------------------------------------
$user = 'admin'
$pass = 'admin'
@jimbrig
jimbrig / install-nerdfonts.ps1
Created October 28, 2023 23:04 — forked from dorlugasigal/install-nerdfonts.ps1
nerd-fonts windows install script. accepts optional argument for the font to install, otherwise all patched-fonts are installed
# run this with an argument to install a nerdfont on windows
# run this with no arguments to install all fonts
# font name, as seen on https://www.nerdfonts.com/font-downloads
param(
[Parameter(Mandatory=$False, Position=0, ValueFromPipeline=$false)]
[System.String]
$fontTarget="*"
)
# build temp directory for git clone
@jimbrig
jimbrig / geojson-conversion.sh
Created October 28, 2023 12:34 — forked from benbalter/geojson-conversion.sh
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@jimbrig
jimbrig / iOS Shortcuts Catalog.md
Created October 27, 2023 21:31 — forked from brucebentley/iOS Shortcuts Catalog.md
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

1. Run following script in PowerShell

param (
    [Parameter(Mandatory=$true)][string]$certificatename,
    [Parameter(Mandatory=$true)][SecureString]$certificatepassword
 )
# setup certificate properties including the commonName (DNSName) property for Chrome 58+
$certificate = New-SelfSignedCertificate `
    -Subject localhost `
    -DnsName localhost `
@jimbrig
jimbrig / edge-search-engine-export-import.js
Created October 25, 2023 18:27 — forked from karlmayer/edge-search-engine-export-import.js
Edge browser search engine export & import function
// export search engines
// based on https://superuser.com/a/1626575
// visit edge://settings/searchEngines, run in Developer Tools (F12)
(function exportSEs() {
// auxiliary function to download a file with the exported data
function downloadData(filename, data) {
const file = new File([data], { type: 'text/json' });
const elem = document.createElement('a');
elem.href = URL.createObjectURL(file);
elem.download = filename;
@jimbrig
jimbrig / readwise_obsidian_export.md
Created September 7, 2023 21:56 — forked from jgeusebroek/readwise_obsidian_export.md
Readwise Obsidian export templates

File name

{{last_highlighted_date |date('Y-m-d')}} {{title|replace(""","")|replace(""","")|replace("'","")|replace("'","")|truncate(159)}} by {{author|replace("@","")|truncate(80)}}

Add date and sanitize filename.

Page Metadata

{% if image_url -%}
![rw-book-cover]({{image_url}})
function Get-ArgumentCompleter {
<#
.SYNOPSIS
Get custom argument completers registered in the current session.
.DESCRIPTION
Get custom argument completers registered in the current session.
By default Get-ArgumentCompleter lists all of the completers registered in the session.
.EXAMPLE
Get-ArgumentCompleter
@jimbrig
jimbrig / README.md
Created August 9, 2023 21:32 — forked from infogulch/README.md
Export installed Chocolatey packages as packages.config - thanks to Matty666

Put update.ps1, install.ps1, record.ps1, and packages.config inside a git repository to enable tracking which versions you have installed at any one time. This means you can sync between systems and backup via any git host.

Update procedure is:

git pull
./update.ps1
git commit -m "Updated $env:computername"

git push

@jimbrig
jimbrig / $PROFILE
Created August 9, 2023 15:43 — forked from dorlugasigal/$PROFILE
my PowerShell $PROFILE imports
#### user interface ####
Import-Module Terminal-Icons
oh-my-posh --init --shell pwsh --config 'C:\Users\dorlugasigal\OhMyPoshThemes\dlg.omp.json' | Invoke-Expression
#### common aliases ####
Set-Alias g git
Set-Alias vim nvim
Set-Alias vi nvim