Skip to content

Instantly share code, notes, and snippets.

View Salamanstra.user.css
/* ==UserStyle==
@name Salamanstra
@author Cascadea User
@version 1.0
@namespace cascadea188508083
@preprocessor default
==/UserStyle== */
@-moz-document domain("salamanstra.keenspot.com")
{
View 480_tips.md

Tips for C

  1. To stop vscode complaining about struct sigaction, add #define _GNU_SOURCE.
View 480_c_makefile
# ------------------------------------------------
# Generic C Makefile
#
# Adapted from https://stackoverflow.com/questions/7004702
# ------------------------------------------------
##### START CONFIG #####
### START BASIC CONFIG ###
View remap_output
#!/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
A simple mod migration script for Factorio 0.14 -> 0.15
View mod_migrator.sh
#!/bin/bash
VERSION="1.1.1"
# ██ ██ ███████ ██████ ██ ███████ ██ ██ █████ ██████ ██████ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██ █████ ██████ ██ █████ ████ ███████ ██████ ██ ███ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ████ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ███████
@thislooksfun
thislooksfun / gquit
Created Feb 21, 2017
Small Bash script to gently quit applications from the command line
View gquit
#!/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
My personal .bash_profile
View .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
View PreventBootcampAutomount.md
  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...)

@thislooksfun
thislooksfun / upload
Last active Jun 26, 2016
Work with Screeps modules in folders
View upload
mkdir dist
cd javascript
for f in $(find . -name '*.js'); do
f1="${f/.\//}"
cp $f "../dist/${f1//\//.}"
done
cd ..
grunt screeps
@thislooksfun
thislooksfun / progress.htm
Created Sep 7, 2015
Simple html5 / css3 / js progress bar example. Go nuts.
View progress.htm
<html>
<head>
<title>Progress bar testing</title>
<style>
body {
background-color: #444;
margin: 0 25%;
}
.bar_container {
You can’t perform that action at this time.