Skip to content

Instantly share code, notes, and snippets.

View danawesome's full-sized avatar

D. Awesome danawesome

  • Orion Media
  • Idaho, USA
View GitHub Profile
@danawesome
danawesome / clear-reddit-recents-store.md
Created June 18, 2025 17:20
Clear/Remove Reddit 'Recents'

Clear/Remove Reddit 'Recents'

Open the Browser's Developer Tools panel

Ctrl+Shift+i should open the browser's Browser's Developer Tools panel.

Be sure it is on the console tab of that panel.

Then you can copy and paste the JS code below to clear the recents.

@danawesome
danawesome / wsl-cliff's notes.md
Created June 9, 2025 22:49
WSL Cliff's Notes

Open PowerShell as Administrator

In order to work on WSL, first shutdown (if nothing is running) wsl --shutdown wsl --manage debian --set-default-user root - Sets root as default in order to be able to change the password or other things on the regular account

Install distro without MS Store wsl --install -d debian

Get a list of distros

@danawesome
danawesome / Update-Current-Access-Request-Email.ps1
Created September 13, 2024 21:30
SharePoint 2019 On-prem Update Access request email addresses in Site Collection(s)
<#
.SYNOPSIS
This script updates the Request Access email address for all the webs for
a single Site Collection or Web Application's Site Collections.
.DESCRIPTION
This script searches through a site collection or web application's site collections
looking for the current email set for Access Requests, and replaces the current email
with the email provided in the script.
@danawesome
danawesome / install-custom.sh
Last active April 12, 2025 08:11
Zorin OS 17 Post Install custom installs
#!/bin/bash
# APT Install of net-tools, MS VSCode (and dependencies), then reboot.
if [ "$(id -u)" -ne 0 ]; then
echo 'This script must be run with root privileges' >&2
exit 1
fi
apt update && apt upgrade -y
@danawesome
danawesome / uninstall-xrdp.sh
Last active April 13, 2025 10:34
Zorin OS 17 remove enhanced session xrdp
#!/bin/bash
if [ "$(id -u)" -ne 0 ]; then
echo 'This script must be run with root privileges' >&2
exit 1
fi
if [ -f /var/run/reboot-required ]; then
echo "A reboot is required in order to proceed with the install." >&2
echo "Please reboot and re-run this script to finish the install." >&2
@danawesome
danawesome / install-xrdp.sh
Last active August 13, 2025 22:58
Zorin OS 17 enhanced session install.sh
#!/bin/bash
# This script is for Zorin!_OS 17 to download and install XRDP+XORGXRDP via source.
#
# Based on the following scripts:
# https://github.com/microsoft/linux-vm-tools/tree/master/ubuntu/18.04
# https://github.com/microsoft/linux-vm-tools/pull/106
# https://gist.github.com/phillipsj/a4b6e4a1070b4320ed19e061fe2dd83d
# https://gist.github.com/kaitwalla/9fbcef47c5ff2b58cd353ba3744be4e5
# https://github.com/itsmebhavin/zorin-os-xrdp/blob/master/install.sh
@danawesome
danawesome / SharePoint-2013-REST-API-ES6-Demo.md
Last active October 20, 2022 16:08
SharePoint REST API Delete List Items

Answer to StackExchange SharePoint Question "[Deleteing SharePoint List elements with specific values in a column][2]"

Sample Example: using REST API and ES6

I wanted to provide an example that doesn't use jQuery.

The answer is longer than it strictly needs to be. However, if you are doing this a lot, the helpers and utility functions, with some light error handling, come in handy.

The code below assumes you have [JSON Light][1] enabled in your SharePoint Environment. (Supported in 2013 via SP1 and add some assembly references to the web.config. JSON Light is present in 2016, 2019, SPO. Not supported in 2010)

@danawesome
danawesome / working-code.js
Last active March 5, 2020 17:52
REST calls from one SharePoint Site Collection to another on-prem 2013
// ASSUMPTIONS:
/*
CORS is configured for SharePoint to allow your base url i.e.: *.domain.net
https://stackoverflow.com/questions/33367758/enable-cors-in-sharepoint-2013
https://enable-cors.org/server_iis7.html
Fetch is used and polyfilled for IE
whatwg-fetch v3.0.0
Promises are used and polyfilled for IE
promise-polyfill 8.1.3
SharePoint is configured for JSONLite
@danawesome
danawesome / sharepoint-style.css
Last active June 23, 2020 00:20 — forked from wpsmith/sharepoint-style.css
CSS: Bootstrap fixes for SharePoint
/*bootstrap resets for SharePoint*/
/* the following might not be needed for you environment uncomment if needed*/
/*
#suiteBar *,
#suiteBar *:before,
#suiteBar *:after,
#s4-ribbonrow *,
#s4-ribbonrow *:before,
#s4-ribbonrow *:after {
-moz-box-sizing: content-box !important;