Skip to content

Instantly share code, notes, and snippets.

View alecnunn's full-sized avatar
🏳️‍🌈

Alec Nunn alecnunn

🏳️‍🌈
View GitHub Profile
@ohanhi
ohanhi / frp.md
Last active May 7, 2026 01:30
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@0xabad1dea
0xabad1dea / severscam.md
Last active July 12, 2021 01:32
Sever Scam

The Scammiest Scam To Yet Anonymity Scam

I'm still holding out for this being a hoax, a big joke, and that they're going to cancel the kickstarter any minute. It'd be quite the cute "lessons learned" about anonymity scams. However, I will be treating it from here on out as a genuine scam. (As of May 2nd, the kickstarter has been cancelled, after the strangest attempt to reply to this imaginable. Good riddance.)

This absolutely ridiculous thing was brought to my attention by a friend and since it was late at night I thought I must be delirious in how absurdly over the top fake it seemed. So I slept on it, woke up, and found that it had gotten a thousand dollars more funding and was every bit as flabbergasting as I thought it was.

Since I realize that not everyone has spent their entire lives studying computers – and such people are the targets of such scams –

@vsouza
vsouza / .bashrc
Last active January 31, 2026 01:19
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

Following is a translation of a post by Kenta Cho (@abagames) about what he learned making 50 minigames in 2014. The original post is here:

http://d.hatena.ne.jp/ABA/20141223#p1

This translation is by Paul McCann (@polm23); please feel free to contact me with any comments or corrections.

The Secret to Creating Fun Games I Learned By Making 50 Games in a Year

... is that there isn't one.

@trcio
trcio / Callbackr.cs
Last active August 29, 2015 14:02
Callbackr: Easy callback class, for all your callback needs!
public static class Callbackr
{
private static Dictionary<object, Action> callbacks = new Dictionary<object, Action>();
/// <summary>
/// Adds the specified callback with the specified identifier.
/// </summary>
/// <param name="token">The callbacks specified identifier.</param>
/// <param name="callback">The callback to be added.</param>
public static void Add(object token, Action callback)
@tsl0922
tsl0922 / .tmux.conf
Last active May 17, 2026 06:56
vim style tmux config
# vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
@trcio
trcio / IntervalTimer.cs
Last active August 29, 2015 14:02
An Interval Timer for C#. Specify the minimum and maximum time between intervals, and let the timer do the rest!
using System;
using System.Threading;
public sealed class IntervalTimer
{
private Timer timer;
private Random rand;
private int min, max;
public event Action Interval;
@trcio
trcio / UnixTime.cs
Last active August 29, 2015 14:02
Unix Timestamp for C#
public static class UnixTime
{
public static int Get()
{
return (int)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;
}
public static DateTime ToDateTime(int timestamp)
{
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
@Experiment5X
Experiment5X / Instruction2Bytecode.py
Created April 11, 2014 18:14
Convert an assembly instruction into its bytecode. It uses gas and otool, so this will only work on OS X, but it'd be pretty easy to modify it for linux.
# USAGE INSTRUCTIONS
# It's an interactive shell, where you have the following options...
# - Just type in an assembly instruction in Intel syntax, and it'll spit out the bytecode
# - Change the syntax to AT&T with the att command
# - Change the syntax back to Intel with the intel command
# - Quit with the q command
import os
import sys
import tempfile
import subprocess
@trcio
trcio / JsonUtil.cs
Last active August 28, 2016 23:33
An easy to use JSON serializer/deserializer. Requires the assembly reference of 'System.Runtime.Serialization'.
using System.Runtime.Serialization.Json;
using System.IO;
using System.Text;
public static class JsonUtil
{
/// <summary>
/// Serializes an object to the respectable JSON string.
/// </summary>
public static string Serialize<T>(T o)