Skip to content

Instantly share code, notes, and snippets.

View pseudosavant's full-sized avatar

Paul Ellis pseudosavant

View GitHub Profile
@pseudosavant
pseudosavant / ChromiumEdge Protocol Handler Bypass.reg
Created March 25, 2020 18:51
Windows registry file for enabling the "always open these links in XYZ application" checkbox
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium]
"ExternalProtocolDialogShowAlwaysOpenCheckbox"=dword:00000001
@pseudosavant
pseudosavant / chromiumSearchProviders.md
Last active March 18, 2024 18:06
Extra Search Providers for Chrome/Edge (Chromium)

This is a list of OpenSearch providers that can be used with most Chromium-based browsers. Go to Chrome/Edge Settings (chrome://settings/searchEngines) to add them so you can quick search from the URL bar.

@pseudosavant
pseudosavant / jSugar.js
Last active May 24, 2024 01:07
Utility function that adds in some jQuery-like syntactic sugar
// jQuery-like syntactic sugar. Only queries for one element. Does not loop over multiple like jQuery
export function $(query) {
if (typeof query === 'undefined') throw 'No query provided to $';
var el;
if (typeof query.nodeType === 'string') {
el = query;
} else if (typeof query === 'string' && query[0] === '<') {
const container = document.createElement('div');
container.innerHTML = query;
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active May 19, 2024 10:45
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@pseudosavant
pseudosavant / windows-10-post-crapware-cleanup.ps1
Last active November 16, 2022 12:59
Powershell Script to remove most of the crapware that comes with Windows 10. Run direct from web: . { iwr -useb https://gist.githubusercontent.com/pseudosavant/dd49f164c8aaf88c5505b2bbec2e3221/raw/windows-10-post-crapware-cleanup.ps1 } | iex
# Sometimes
#Get-AppxPackage *bingweather* | Remove-AppxPackage
#Get-AppxPackage *bingnews* | Remove-AppxPackage
#Get-AppxPackage *bingfinance* | Remove-AppxPackage
#Get-AppxPackage *bingsports* | Remove-AppxPackage
#Get-AppxPackage *MSPaint* | Remove-AppxPackage
#Get-AppxPackage *people* | Remove-AppxPackage
#Get-AppxPackage *soundrecorder* | Remove-AppxPackage
@alfredkrohmer
alfredkrohmer / list-user-installed-packages.sh
Created February 11, 2017 13:39
List all user-installed packages on OpenWrt / LEDE
#!/bin/sh
FLASH_TIME=$(opkg info busybox | grep '^Installed-Time: ')
for i in $(opkg list-installed | cut -d' ' -f1)
do
if [ "$(opkg info $i | grep '^Installed-Time: ')" != "$FLASH_TIME" ]
then
echo $i
fi
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 27, 2024 21:14
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@nathansmith
nathansmith / [1] flag_linkedin_recruiters.js
Last active January 28, 2016 20:07
This function can be used to pre-check (for removal) all recruiters in your LinkedIn connections list.
/*
This function can be used to pre-check (for removal)
all recruiters in your LinkedIn connections list.
It excludes recruiters that are also colleagues, so
you don't accidentally get any false positivies.
It doesn't actually do any deletion, just makes the
connections list focused solely on recruiters. The
deletion itself is up to you.
@leommoore
leommoore / file_magic_numbers.md
Last active May 31, 2024 11:11
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files

@anantn
anantn / getusermedia_picture.html
Created February 17, 2012 09:12
Take a picture with getUserMedia
<html>
<body>
<video id="v" width="300" height="300"></video>
<input id="b" type="button" disabled="true" value="Take Picture"></input>
<canvas id="c" style="display:none;" width="300" height="300"></canvas>
</body>
<script>
navigator.getUserMedia({video: true}, function(stream) {
var video = document.getElementById("v");
var canvas = document.getElementById("c");