Skip to content

Instantly share code, notes, and snippets.

View M4cs's full-sized avatar

Max Bridgland M4cs

View GitHub Profile
@M4cs
M4cs / compress.bat
Last active November 2, 2020 23:52
How to right-click to compress files w/ FFMPEG
@echo OFF
SET subject=%*
for %%a in (%*) do set subject=%%a
python C:\\Users\\Max\\ffmpeg-compress\\compress.py %subject%
#import "PSTableCell.h"
#include <sys/cdefs.h>
__BEGIN_DECLS
extern NSString *const PSAccessoryKey; // @"accessory"
extern NSString *const PSActionKey; // @"action"
extern NSString *const PSAdjustFontSizeToFitWidthKey; // @"adjustFontSizeToFitWidth"
extern NSString *const PSAlignmentKey; // @"alignment"
extern NSString *const PSAppGroupBundleIDKey; // @"appGroupBundleID"
@M4cs
M4cs / Installing Mods-Maps from Mod.io.md
Last active July 6, 2020 18:58
Installing Mods/Maps from Mod.io

Installing Mods/Maps from Mod.io

For Maps/Gear/Non-Mods:

  1. Download the .zip file from Releases:

  1. Unzip the file and drag into respective directory.
@M4cs
M4cs / Setting Up A SkaterXL Server on Ubuntu 16.04-18.04.md
Created June 14, 2020 22:42
Setting Up A SkaterXL Server on Ubuntu 16.04/18.04

Setting Up A SkaterXL Server on Ubuntu 16.04/18.04

Getting Started

First, completely uninstall Wine or get a fresh server to do this on. A fresh server is the best option here.

Next Install wine-stable with the following tutorial: https://tecadmin.net/install-wine-on-ubuntu/

Once you have that installed make sure wine --version returns something like 5.0.1 or above.

@M4cs
M4cs / __init__.py
Created April 23, 2020 17:59
Twitter OAuth Tutorial
from flask import Flask
from flask_restful import Api
from requests_oauthlib.oauth1_auth import Client
config = {
'twitter_consumer_key': 'ENTER TWITTER CONSUMER KEY',
'twitter_consumer_secret': 'ENTER TWITTER CONSUMER SECRET'
}
app = Flask(__name__)
api = Api(app)
oauth = Client(config['twitter_consumer_key'], client_secret=config['twitter_consumer_secret'])
@M4cs
M4cs / nordish.json
Created April 14, 2020 01:00
iTerm2 Theme
{
"Working Directory" : "\/Users\/max",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 1,
"Green Component" : 0
},
@M4cs
M4cs / Test Substitutions.plist
Created April 6, 2020 19:25
Open System Preferences > Keyboard > Text and Drag This As A .plist File Onto It
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>phrase</key>
<string>⏩</string>
<key>shortcut</key>
<string>:fast_forward_button:</string>
</dict>
package us.updat.betterparty.utils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import us.updat.betterparty.BPMain;
import us.updat.betterparty.BPParty;
@M4cs
M4cs / nearrepprimegen.py
Created January 23, 2020 21:11
Outputs Prime Glitch Numbers (ex. 101, 555555555555555585555555, 999999999....999998999999....9999)
def uniqnum(num):
unique_set = {}
for num in str(num):
if unique_set.get(num):
unique_set[num] += 1
else:
unique_set[num] = 1
return unique_set
def isPrime(n) :
@M4cs
M4cs / Flask Server Setup Unix.md
Created January 21, 2020 20:44
How I run and host my Flask servers on Ubuntu

First you'll need some dependencies:

pip install supervisor virtualenv

Next you need to make a directory for your application:

cd ~