Skip to content

Instantly share code, notes, and snippets.

View DarkMatterMatt's full-sized avatar

Matt Moran DarkMatterMatt

  • Sydney, Australia
  • 07:13 (UTC +10:00)
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@DarkMatterMatt
DarkMatterMatt / AutoLogin_for_VexForums.tamper.js
Last active December 31, 2017 21:00
AutoLogin_for_VexForums.tamper.js
// ==UserScript==
// @name AutoLogin for VexForums
// @namespace MattMoran
// @version 1.0.0
// @description VexForums logs itself out frequently. It's a PITA.
// @updateURL https://gist.githubusercontent.com/DarkMatterMatt/d9092fea491c7de5bebf7b1c4cee10af/raw/
// @author Matt Moran
// @copyright Matt Moran 2017
// @match https://www.vexforum.com/*
// ==/UserScript==
@DarkMatterMatt
DarkMatterMatt / AutoRefresh_for_Github.tamper.js
Last active December 31, 2017 21:02
AutoRefresh for Github
// ==UserScript==
// @name AutoRefresh for Github
// @namespace MattMoran
// @version 1.0
// @description Automatically refreshed inactive Github tabs every 10 mins
// @author Matt Moran
// @copyright Matt Moran 2017
// @match https://github.com/*/*/*
// @updateURL https://gist.github.com/DarkMatterMatt/0cda044231c3ec45fb788713e6a023cc/raw/
// @require https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.min.js
@DarkMatterMatt
DarkMatterMatt / Latest_RASP_for_rasp.nz.tamper.js
Last active July 21, 2018 23:00
Latest RASP for rasp.nz
// ==UserScript==
// @name Latest RASPs page for rasp.nz
// @namespace MattMoran
// @version 2.0.1
// @description Allows using rasp.nz/rasp/latest
// @updateURL
// @author Matt Moran
// @copyright Matt Moran 2017
// @match http://rasp.nz/rasp/latest*
// ==/UserScript==
@DarkMatterMatt
DarkMatterMatt / Auto_Club_selector_for_TaskPilot.tamper.js
Last active December 31, 2017 21:03
Auto Club selector for TaskPilot
// ==UserScript==
// @name Auto Club selector for TaskPilot
// @namespace MattMoran
// @version 1.0.0
// @description Automatically select your club
// @updateURL https://gist.github.com/DarkMatterMatt/badf3a61d743a098773e48150a4402e0/raw/
// @author Matt Moran
// @copyright Matt Moran 2017
// @match http://taskpilot.org/
// ==/UserScript==
@DarkMatterMatt
DarkMatterMatt / cf-ddns.sh
Last active January 21, 2019 22:28 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@DarkMatterMatt
DarkMatterMatt / 3.6_fstring-3.5_strformat.py
Last active June 23, 2018 10:01
Converts all Python 3.6 fstrings f"insert {var:.2f} here" to Python 3.5 compatible string.format "insert {:.2f} here".format(var)
##############################################################################
## 3.6_fstring-3.5_strformat.py ##
## Matt Moran (2018) ##
##############################################################################
## Usage: python 3.6_fstring-3.5_strformat.py file_to_process.py
##
## Converts all 3.6 fstrings f"insert {var:.2f} here" to 3.5 compatible
## "insert {:.2f} here".format(var)
##
## Works with:
@DarkMatterMatt
DarkMatterMatt / salien_launcher.sh
Last active July 2, 2018 09:49
Run SalienCheat for multiple users and auto-updates every 30 mins. Webpage to view the log online (support for pretty colours).
#!/bin/bash
declare -A USERS # associative array
# enter users here
USERS[name1]="token1xxxxxxxxxxxxxxxxxxxxxxxxxx steamID64optional"
USERS[name2]="token2xxxxxxxxxxxxxxxxxxxxxxxxxx steamID64optional"
USERS[examp]="efa1d62e8e422acc0a76aff5ac889d71 76561197295961561"
BASE_DIR=/home/pi/saliencheat
@DarkMatterMatt
DarkMatterMatt / discord_url_handling.csv
Last active February 25, 2020 02:49
Discord URL handling
Backend Mobile Desktop Web
Displays the user:pass N/A N N N
Link contains the user:pass Y N Y Y
Accepts percent encoded symbols (%78) Y Y Y Y
Accepts unicode percent encoding (%u0078) Y Y N N
@DarkMatterMatt
DarkMatterMatt / reorderCSS.js
Last active February 12, 2023 11:21
Reorder CSS attributes according to the LINE_ORDER defined below
const fs = require("fs");
const path = require("path");
/**
* Reorders CSS attributes according to the LINE_ORDER defined below.
* - Existing line breaks and whitespace is preserved
* - Attributes must on a single line
* - Opening braces must be at the end of their line
* - Closing braces must be on a newline
* - The original file is renamed with a .bak file extension