Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Remove Promoted Reddit Posts
// @namespace /
// @version 2.0
// @description try to take over the world!
// @author You
// @match /\*
// @grant none
// ==/UserScript==
(function() {
@ajorpheus
ajorpheus / teachable-toggle-sidebar.user.js
Last active October 24, 2023 21:25
Keyboard Shortcut and Button to hide sidebar on Teachable websites
// ==UserScript==
// @name Teachable Toggleable Sidebar
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Get more screen video realstate by toggling the course outline sidebar
// @author ajorpheus
// @match https://learn.cantrill.io/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=cantrill.io
// @require http://code.jquery.com/jquery-3.1.1.slim.min.js
// @require https://gist.githubusercontent.com/BrockA/2625891/raw/waitForKeyElements.js
@ajorpheus
ajorpheus / JQuery.ShortcutKeys-1.0.0.js
Created July 10, 2022 17:05
jquery keyboard shortcuts
/**
* ------------------------------------------------------------------------------------------------
* Rogel Delgado Mesa, 2019
* ------------------------------------------------------------------------------------------------
*/
// KEYCODES //
var BACK_SPACE = 8; // BACKSPACE
var TAB = 9; // TAB
var RETURN = 13; // ENTER
@ajorpheus
ajorpheus / waitForKeyElements.js
Created May 17, 2022 08:12 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
// Following grants are needed for some of the functions below to function
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// @grant GM_notification
function log_noti_simple(text, timeout = 2000) {
console.log(`Running "${GM_info.script.name}"`)
// Timeout should be at least 1 second (1000ms) for it to be useful
timeout = timeout < 1000 ? 1000 : timeout;
@ajorpheus
ajorpheus / disable.sh
Created February 2, 2022 21:37 — forked from b0gdanw/disable.sh
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true
@ajorpheus
ajorpheus / passgitgpg.md
Created February 2, 2022 15:12 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@ajorpheus
ajorpheus / aws_log_cleanup.sh
Created January 27, 2022 13:36
Delete log groups matching a specific pattern and other filter criteria
#!/bin/bash
## Log groups must match ALL these criteria to be processed
log_name_include="$1" #Only logs containing this string in their name will be included
region="${2:-"eu-west-1"}"
retention_period_filter="400" #Logs with this retention period will be excluded
log() { printf "\n%b" "$*"; }
define_colors_for_logging() {
err="\e[48;5;1m"
@ajorpheus
ajorpheus / create-dockerhub-repo.sh
Created August 24, 2021 09:41
Create a repository on Docker Hub from CLI
#!/usr/bin/env bash
export USER="johndoe"
export PASS="personal-access-token"
## Get the JWT token
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${USER}'", "password": "'${PASS}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
## API call to create repo
curl -s -H "Authorization: JWT ${TOKEN}" "https://hub.docker.com/v2/repositories/" --data 'description=test' --data 'full_description=full-description' --data 'is_private=true' --data 'name=test' --data "namespace=${USER}"
@ajorpheus
ajorpheus / makeTodo.js
Created February 7, 2021 02:09 — forked from nicksmarto/makeTodo.js
Google Aps Script for Sheets to automatically pull, format, sort and populate active Todoist tasks in to Google Sheet
//*********************************************************************************************************
//makeTodo: Call other functions to make the daily Todo
//*********************************************************************************************************
function makeTodo(){
//Populate Header
grabHeader("B1")
//Populate Task List