Skip to content

Instantly share code, notes, and snippets.

@jimbrig
jimbrig / Wake.ps1
Created February 8, 2024 21:03 — forked from alimbada/Wake.ps1
PowerShell script for sending Wake On LAN magic packets to given machines/MAC address(es)
#######################################################
##
## Wake.ps1, v1.0, 2013
##
## Adapted by Ammaar Limbada
## Original Author: Matthijs ten Seldam, Microsoft (see: http://blogs.technet.com/matthts)
##
#######################################################
<#
@jimbrig
jimbrig / PoSH_Postback.ps1
Created November 6, 2023 22:43 — forked from airtank20/PoSH_Postback.ps1
Script to download file from javascript Postback
#URL that needs to be fetched
$url = "https://site.state.gov/default.aspx"
#get the server name in case the process jumps to another script
$serverName = $env:computername
#wrapped it into a try/catch for some type of error handling
TRY {
#use invoke-webrequest to fetch a session from the site
Invoke-WebRequest $url -SessionVariable session -UseBasicParsing
@jimbrig
jimbrig / CustomTypeExample.psd1
Created November 3, 2023 02:07 — forked from michaeltlombardi/CustomTypeExample.psd1
PowerShell module with accelerated and usable custom types.
@{
RootModule = 'CustomTypeExample.psm1'
ModuleVersion = '0.1.0'
GUID = '2779fa60-0b3b-4236-b592-9060c0661ac2'
Author = 'mikey'
CompanyName = 'Unknown'
Copyright = '(c) mikey. All rights reserved.'
FunctionsToExport = @(
'New-AcceleratedClass'
'New-UsableClass'
@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}})