Skip to content

Instantly share code, notes, and snippets.

@NanoSmasher
NanoSmasher / ffmpegwindowscmd.md
Created April 18, 2022 23:21
FFMPEG commands that I use often when I just want to put out OBS recorded clips without much editing on my Windows machine

Personal FFMPEG notes for Windows Command Prompt

FFMPEG commands that I use often when I just want to put out OBS recorded clips without much editing.

Basic Conversion

No arguments

ffmpeg -i INPUT.mkv OUTPUT.mp4
@NanoSmasher
NanoSmasher / ShipQuotes.py
Last active May 7, 2019 00:49
program to create quote pages using the new quote format for al wiki
import mwclient
from mwclient import Site
import pathlib
import configparser # reading config file
import base64 # encryption
import re
import csv
import requests
from bs4 import BeautifulSoup
import logging
@NanoSmasher
NanoSmasher / lowerdiag.py
Created December 22, 2018 04:48
Lower-diagonal cell equal for matchup charts. Hardcoded variables and Not optimized at all -_-
s = ""
t = ["B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AK", "AL", "AM", "AN", "AO", "AP", "AQ", "AR", "AS", "AT", "AU", "AV", "AW", "AX", "AY", "AZ", "BA", "BB", "BC", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BK", "BL", "BM", "BN", "BO", "BP", "BQ", "BR", "BS", "BT"]
for i in range(4,74):
e = ""
for j in range(4,74):
if i <= j:
e += "\t"
else:
e += "=" + t[i-4] + str(j) + "\t"
s += e+"\n"
@NanoSmasher
NanoSmasher / AzurlaneEditSkills.py
Created November 27, 2018 21:06
Very specific script to edit skill template information in mediawikis
import mwclient
from mwclient import Site
import pathlib
import configparser # reading config file
import base64 # encryption
import re
def main():
# settings.ini file not found
if not pathlib.Path("settings.ini").is_file():
@NanoSmasher
NanoSmasher / (Filter)AzurLane-Common.js
Created September 11, 2018 22:06
Adds sorting to "filter-ship" elements using dropdown id="typeSelectDiv", "nationSelectDiv", or "raritySelectDiv"
var shipsToFilter = {}; // All ships containing "filter-ship"
var types = ["Aircraft Carrier","Battleship","Light Aircraft Carrier","Repair Ship","Submarine","Monitor","Destroyer","Battlecruiser","Heavy Cruiser","Light Cruiser"]; //List of ship types
var nations = ["Vichya Dominion","Eastern Radiance","Bilibili","Iris Libre","Ironblood","North Union","Neptunia","Eagle Union","Sakura Empire","Universal","Royal Navy"]; //List of ship nations
var rarities = ["Normal","Rare","Elite","Priority","Super Rare","Legendary"]; //List of ship rarities
// mediawiki ships with jQuery, how nice!
$(document).ready(function() {
shipsToFilter = document.getElementsByClassName("filter-ship");
createDropdowns();
});
@NanoSmasher
NanoSmasher / sync.sh
Last active October 26, 2015 20:41
This script forces a UofT Skule Engineering website domain (*.skule.ca) to sync with a Github repository. More information in file.
#!/bin/bash
# This script forces a UofT Skule Engineering website domain (*.skule.ca) to sync with a Github repository.
# To run it, create a Cron Job with "bash sync.sh >> ~/sync.log 2>&1" and set an interval (like every 3 days).
# Don't forget to edit the GIT_USER and GIT_REPO variables or else you be using my website!
# The commands are only core utilies [cp, date, echo, export, unzip, wget] meaning it will work pratically anywhere.
# Define Github repository
export GIT_USER=NanoSmasher
export GIT_REPO=smash.skule.ca
@NanoSmasher
NanoSmasher / skule.sh
Created July 29, 2015 21:22
This script aids in management of a UofT Skule Engineering website domain (*.skule.ca) w/Github & Jekyll. More information in file.
#!/bin/bash
# This script aids in management of a UofT Skule Engineering website domain (*.skule.ca) w/Github & Jekyll.
# To run it, create a Cron Job with "bash skule.sh >> ~/skule.log 2>&1".
# Don't forget to edit the GIT_USER and GIT_REPO variables or else you be using my website!
# The script uses Jekyll to build websites hosted by github repository. Jekyll is flexible and easy to use so try it.
# The default Ruby version in the linode is 1.8.7 which is not supported by Jekyll.
# YAML, Ruby 2.1.1, bundler, and gh-pages are dependancies to get Jekyll working without root or admin priviledges.
# When the script is finished, it should create a update.sh file.
@NanoSmasher
NanoSmasher / lammps.lang
Created July 22, 2015 22:36
gedit Syntax Highlighting for LAMMPS Molecular Dynamics Simulator (to use $sudo cp lammps.lang /usr/share/gtksourceview-3.0/language-specs)
<?xml version="1.0" encoding="UTF-8"?>
<language id="lammps" _name="Lammps" version="2.0" _section="Scientific">
<metadata>
<property name="mimetypes">text/lammps</property>
<property name="globs">*.in;*.lammps</property>
</metadata>
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
@NanoSmasher
NanoSmasher / Matchup.py
Created July 6, 2015 15:49
Used to convert number of wins for each pair of people to create a [n] x [n] matchup chart
n = input("Size of Chart[2-26]: ")
from string import uppercase as c
s = ""
for i in range(2,n+2):
e = ""
for j in range(2,n+2):
if i == j:
e += "X\t"