Skip to content

Instantly share code, notes, and snippets.

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

Alec alecnunn

🏳️‍🌈
View GitHub Profile
@alecnunn
alecnunn / semantic-commit-messages.md
Created September 27, 2021 18:11 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Keybase proof

I hereby claim:

  • I am alecnunn on github.
  • I am alecnunn (https://keybase.io/alecnunn) on keybase.
  • I have a public key ASB7yvkZ2lovheZ_c1sbLAz1po6fl13a2xp_R5CaDQQb0Qo

To claim this, I am signing this object:

@alecnunn
alecnunn / MenuItems.cs
Last active April 6, 2023 16:40
Unity3D Scripts that I use to make development just a bit easier from time to time.
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
namespace Vectohl {
public class MenuItems {
[MenuItem("Endorin/Generate File Structure")]
@alecnunn
alecnunn / vm.c
Created December 31, 2016 22:33 — forked from jmiserez/vm.c
X86 (subset) interpreter, prototype. Reads instructions from plaintext file, instructions separated by spaces.
/*
* vm.c - Simple X86 interpreter
*
* Copyright (c) 2013, Jeremie Miserez <[email protected]>
*/
/*
* Highlights/Features not specified in assignment
* ===============================================
* - Memory simulation of all 4GB with paging
import java.util.Arrays;
import java.util.ArrayList;
enum ChessPiece{
K(new int[][]{{-1,-1},{-1,0},{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1}}),
N(new int[][]{{1,2},{2,1},{2,-1},{1,-2},{-1,-2},{-2,-1},{-2,1},{-1,2}}),
R(new int[][]{{-1,0},{0,1},{1,0},{0,-1}}),
Q(new int[][]{{-1,0},{0,1},{1,0},{0,-1},{-1,-1},{-1,1},{1,1},{1,-1}}),
B(new int[][]{{-1,-1},{-1,1},{1,1},{1,-1}}),
P(new int[][]{{-1,-1},{-1,+1}});
@alecnunn
alecnunn / iprange.py
Created September 24, 2015 13:49
Get IPs in a specific range, such as: 192.168-180.1-5.0
def GetIPs(iprange):
nets = iprange.split('.')[1:-1]
firstOctet = nets[0].split('-')
secondOctet = nets[1].split('-')
ips = []
def get_range(r):
l = []
if len(r) != 2:
l.append(r[0])
// recursive gz, tgz, zip files
// russ cox, march 2010 <[email protected]>
package main
import (
"bufio"
"bytes"
"compress/flate"
"fmt"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Text.RegularExpressions;
using System.IO;
namespace SVN_Archiver {
#!/usr/bin/env perl
#
# Author: philsmd
# Released to the public domain
# Special thx to atom for his help
#
use strict;
use warnings;
/**********************************************************************/
/* scrdec.c - Decoder for Microsoft Script Encoder */
/* Version 1.8 */
/* */
/* COPYRIGHT: */
/* (c)2000-2005 MrBrownstone, mrbrownstone@ virtualconspiracy.com */
/* v1.8 Now correctly decodes characters 0x00-0x1F, thanks to 'Zed' */
/* v1.7 Bypassed new HTMLGuardian protection and added -dumb switch */
/* to disable this */
/* v1.6 Added HTML Decode option (-htmldec) */