Skip to content

Instantly share code, notes, and snippets.

@porteusconf
porteusconf / med-emerg-contact--wearable-qrcode.vcf
Created May 18, 2020 13:20
Vcard to. print as qrcode on wearable bracelet/pendant to display as a contact on 1st responders phone emergency contact and medical alert info on allergies of the wearer
BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.14.6//EN
N:;;;;
FN:Emergency Medical info and contacts for John Anyone Doe
ORG:Please delete this contact after the emergency;
EMAIL;type=INTERNET;type=HOME;type=pref:emergency-contact-info
TEL;type=MAIN;type=pref:1-800-MY-APPLE
item1.ADR;type=WORK;type=pref:;;1 Infinite Loop;Cupertino;CA;95014;United States
item1.X-ABADR:us
@ECHO off
setlocal EnableDelayedExpansion
for /f "tokens=2,4" %%a in ('QUERY USER ^| FINDSTR ">"') DO (
set "consoleTemp=%%a"
set "connectionState=%%b"
set "consoleType=!consoleTemp:~0,7!"
@porteusconf
porteusconf / hideshutdown.reg
Last active April 22, 2020 15:15
Hides "shutdown" option in win10 start menu, but still see restrart, sleep, lock, etc. Can still shutdown by other means like Alt-F4 or "shutdown -s" (for any user that has not been blocked.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Start\HideShutDown]
"value"=dword:00000001
@porteusconf
porteusconf / macos-ignore-updates.sh
Last active April 15, 2020 13:01
macos-ignore-updates
#! /bin/bash
@porteusconf
porteusconf / gist:80c1ea7edf574f3143e43cbbd4c72de0
Created April 13, 2020 21:24
mordred install with miniconda3
Trying to solve some issues https://github.com/mordred-descriptor/mordred/issues
@porteusconf
porteusconf / sshd-win10.ps1
Created February 19, 2020 17:04
Install ms openssh sshd on win10 LTS without store
# A work in progress, not ready for production (I am horrible at powershell)
# change URL in next line to latest release
wget https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip
echo "unzip the file to a folder, then open powershell as admin in that folder
Set-ExecutionPolicy RemoteSigned # https://stackoverflow.com/a/4038991
install-sshd.ps1
@porteusconf
porteusconf / get-lockscreen-pics.bat
Last active December 13, 2019 20:34
Opens win10 hidden folder with lockscreen pic, copies to c:\temp\pics, and adds .jpg See https://www.laptopmag.com/articles/find-windows-10-lock-screen-pictures
@echo off
echo " Opens win10 hidden folder with lockscreen pic, copies to c:\temp\pics, and adds .jpg "
echo " See https://www.laptopmag.com/articles/find-windows-10-lock-screen-pictures"
mkdir c:\temp
mkdir c:\temp\pics
c:
cd %USERPROFILE%\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
echo "Will open folder with current lock-screen pics. Sort by size and copy big ones to c:\temp\pics folder"
start c:\temp\pics
start .