Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# START CONFIG
USER_AGENT=''
CLIENT_ID=''
CLIENT_SECRET=''
USERNAME=''
PASSWORD=''
# END CONFIG
@thislooksfun
thislooksfun / .gitconfig
Created March 16, 2021 16:34
My Git Aliases
[alias]
aliases = "!echo \"Use 'git la' to list aliases\""
a = add
aa = "!git add -A && git st"
b = branch
bd = branch -d
bl = branch --list
co = checkout
cod = checkout develop
/* ==UserStyle==
@name Salamanstra
@author Cascadea User
@version 1.0
@namespace cascadea188508083
@preprocessor default
==/UserStyle== */
@-moz-document domain("salamanstra.keenspot.com")
{

Tips for C

  1. To stop vscode complaining about struct sigaction, add #define _GNU_SOURCE.
# ------------------------------------------------
# Generic C Makefile
#
# Adapted from https://stackoverflow.com/questions/7004702
# ------------------------------------------------
##### START CONFIG #####
### START BASIC CONFIG ###
#!/usr/bin/env node
const DEFAULT_KEY = "out";
function setOutput(name, val) {
console.log(`::set-output name=${name}::${val}`);
}
function parseAndOutput(data) {
try {
@thislooksfun
thislooksfun / mod_migrator.sh
Last active May 1, 2017 05:39
A simple mod migration script for Factorio 0.14 -> 0.15
#!/bin/bash
VERSION="1.1.1"
# ██ ██ ███████ ██████ ██ ███████ ██ ██ █████ ██████ ██████ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██ █████ ██████ ██ █████ ████ ███████ ██████ ██ ███ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ████ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ███████
@thislooksfun
thislooksfun / gquit
Created February 21, 2017 01:54
Small Bash script to gently quit applications from the command line
#!/bin/bash
if [ $# -eq 1 ]; then
echo "Quitting '$1'"
osascript -e "quit app \"$1\""
else
echo -e " Usage:\n gquit [Application Name]"
fi
@thislooksfun
thislooksfun / .bash_profile
Last active May 9, 2017 18:09
My personal .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
  1. Mount BOOTCAMP disk
  2. Run 'diskutil info /Volumes/BOOTCAMP'
  3. Run 'sudo vifs' and replace old id with the value taken from 'Volume UUID' from the 'diskutil list' above'

More info (Hopefully this link doesn't die like the last one did...)