Skip to content

Instantly share code, notes, and snippets.

@masala-man
masala-man / snazzy.vim
Created October 25, 2022 06:23
Snazzy vim-airline colourscheme for my very specific term setup
" base16-snazzy (sys-dependent version)
" theme format modified from wombat
" colors from sindresorhus/hyper-snazzy & h404bi/base16-snazzy-scheme/
" Made by Ayush Shenoy (masala-man)
"
" BASE16-SNAZZY
let s:base00 = '#282a36'
let s:base01 = '#34353e'
let s:base02 = '#43454f'
let s:base03 = '#78787e'
@masala-man
masala-man / proposal_template.tex
Created November 18, 2021 06:05
Unicode Emoji Proposal Skeleton
\documentclass[oneside]{article}
\usepackage{graphicx}
\usepackage[pagebackref]{hyperref}
\usepackage[section]{placeins}
\author{Submitter: AUTHOR}
\title{Proposal for New Emoji: NAME}
\date{Date: DATE
\begin{document}
@masala-man
masala-man / manpage.css
Created November 5, 2021 06:11
Emulate the look and feel of a manpage
::-webkit-scrollbar {
width: 5px;
height: 1px;
color: black
}
::-webkit-scrollbar-thumb {
background: white
}
::-webkit-scrollbar-thumb:hover {
color: darkgrey;
@masala-man
masala-man / dir_trees.py
Last active July 30, 2021 14:09
Recursively compare directory structures
def are_dir_trees_equal(dir1, dir2):
"""
Compare two directories recursively. Files in each directory are
assumed to be equal if their names and contents are equal.
@param dir1: First directory path
@param dir2: Second directory path
@return: True if the directory trees are the same and
there were no errors while accessing the directories or files,
@masala-man
masala-man / settings.json
Last active July 30, 2021 14:09
base16-snazzy colours for Windows Terminal
"schemes": [
{
"name" : "Snazzy",
"cursorColor": "#97979b",
"selectionBackground": "#f1f1f0",
"background" : "#282a36",
"foreground" : "#eff0eb",
@masala-man
masala-man / bazar.sh
Last active July 30, 2021 14:10
Spin up some docker containers
#!/bin/bash
docker create --name=bazarr \
--restart unless-stopped \
-p 6767:6767 \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Europe/London \
-e UMASK_SET=022 \
-v /home/docker/bazarr/conf:/config \
-v /mnt/Movie\ Library:/movies \
@masala-man
masala-man / cog.py
Last active July 30, 2021 14:11
discord.py cog boilerplate
from discord.ext import commands
class cog_name(commands.Cog, name='Long Cog Name'):
def __init__(self, client):
self.bot = client
@commands.command()
async def first_command(self, ctx):
pass
@masala-man
masala-man / ytdl.py
Last active July 30, 2021 14:12
Download youtube videos listed in a file to flac format and rename
import os
import re
import string
fileName = ''
vidReg = re.compile(r'youtube\.com')
fileRead = open('./req.txt')
length = len(open('./req.txt').readlines( ))
video = fileRead.readlines()
for x in range(length):
@masala-man
masala-man / pythonbuild.sh
Last active July 30, 2021 14:15
Get, build and install a given version of python
#!/bin/sh
VERSION="x.x.x"
sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz
tar xzvf Python-$VERSION.tgz
cd Python-$VERSION
./configure
make
@masala-man
masala-man / baseSafe.sqf
Last active October 3, 2019 11:43
[Alarm Trigger] Trigger for camp rogain squads to react to BLUFOR engagement. #arma
//Trigger Parameters:
//Name: baseSafe
//Shape: ellipse
//Size: 500;400;-1
panzerA1 setPos (c1a modelToWorld [0,1,0]); //Detach from chair and end ambient sitting animation
panzerA1 call BIS_fnc_ambientAnim__terminate;
panzerA2 setPos (c2a modelToWorld [0,1,0]);
panzerA2 call BIS_fnc_ambientAnim__terminate;
panzerA3 setPos (c3a modelToWorld [0,1,0]);
panzerA3 call BIS_fnc_ambientAnim__terminate;