Skip to content

Instantly share code, notes, and snippets.

View GregHilston's full-sized avatar

Greg Hilston GregHilston

View GitHub Profile
@imbilltucker
imbilltucker / why_clojure.html
Created May 6, 2020 19:54
Some notes on clojure
Why Clojure
Clojure Made Simple: https://www.youtube.com/watch?v=VSdnJDO-xdg
What is Clojure?
lisp on the JVM
REPL
immutable data structures
datomic
@FlaShG
FlaShG / CoroutineWorker.cs
Last active September 7, 2021 07:44
Based on MyStaticCode.cs, a class that allows anything to run coroutines from anywhere.
using UnityEngine;
using System.Collections;
public static class CoroutineWorker
{
private class Worker : MonoBehaviour { }
private static Worker worker;
[RuntimeInitializeOnLoadMethod]
@FlaShG
FlaShG / Invoker.cs
Last active September 4, 2023 09:47
A replacement for Unity's MonoBehaviour.Invoke and MonoBehaviour.InvokeRepeating, with extra features.
using System;
using System.Collections;
using UnityEngine;
/// <summary>
/// Replaces MonoBehaviour.Invoke and MonoBehaviour.InvokeRepeating
/// with a more sophisticated attempt. Namely: No strings involved.
/// Use like this:
/// StartCoroutine(Invoker.Invoke(MyMethod, 2));
/// </summary>
@ivanperez-keera
ivanperez-keera / Makefile
Last active February 7, 2024 10:30
Clean LaTeX Makefile
.PHONY: default
# Use texfot if available. Produces less output.
TEXFOT_ARGS=--no-interactive --ignore 'Underfull.*' --ignore 'Package polytable Warning: Redefining column' --ignore 'Package hyperref Warning: Token not allowed in a PDF string' --ignore 'LaTeX Warning: .h. float specifier changed to .ht..'
TEXFOT=$(shell which texfot >/dev/null && echo texfot "${TEXFOT_ARGS}" || echo "")
# TEXFOT=
# Use chronic if available. Removes output on zero exitcode.
CHRONIC=$(shell which chronic || echo "")
@FlaShG
FlaShG / Placr.md
Last active July 20, 2021 12:36
Placr increases your level design speed by letting you place objects quickly. https://youtu.be/nm57A2ySfIY
@strobic
strobic / createIcons.sh
Created March 5, 2017 00:51
A Bash Script to Generate All the Required App Icon Sizes for iOS
#!/bin/bash
#This script will automatically generate all correct sized icons for IOS x and Later
#from a single .svg file
#This script requires ImageMagick (macport or brew it or something)
#usage is:
#>./createIcons.sh [source_file_name].svg
echo $1
fullfile=$1
@azagniotov
azagniotov / download.all.adp.paystubs.js
Last active December 16, 2024 06:08
Downloads all pay-slips from ADP website
/*
This has been tested in Chrome v55.0.2883.95 (64-bit)
1. Log into ADP website using the URL: https://my.adp.com/static/redbox/login.html (Make sure you are NOT in Incognito mode)
2. Open Developer Tools console
3. Run the following code in the console:
*/
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://my.adp.com/v1_0/O/A/payStatements?adjustments=yes&numberoflastpaydates=300');
@sysradium
sysradium / flask_logging.py
Created February 25, 2016 22:12
Logging Flask errors to console to use it with docker and gunicorn
import logging
import flask
app = flask.Flask(__name__)
@app.before_first_request
def setup_logging():
if not app.debug:
# In production mode, add log handler to sys.stderr.
app.logger.addHandler(logging.StreamHandler())
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active November 18, 2024 08:50
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
#!/usr/local/bin/phantomjs
var page = require('webpage').create();
var system = require('system');
// ***** Argument handling
function isInt(value) {
return !isNaN(value) &&
parseInt(Number(value)) == value &&