Skip to content

Instantly share code, notes, and snippets.

Nathan Sweet NathanSweet

Block or report user

Report or block NathanSweet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NathanSweet
NathanSweet / Play.java
Last active Feb 18, 2016
Sync a WAV with Spine playback
View Play.java
// See: http://esotericsoftware.com/forum/Spine-Plugin-in-Support-5859
import java.io.*;
import java.net.Socket;
import javax.sound.sampled.*;
public class Play {
static public void main (String[] args) throws Exception {
if (args.length != 2) {
@NathanSweet
NathanSweet / Reddit_Highlight_New_Comments.user.js
Created Dec 4, 2015
Highlight new Reddit comments with this GreaseMonkey user script.
View Reddit_Highlight_New_Comments.user.js
// ==UserScript==
// @name Reddit: Highlight New Comments v3
// @description Highlights comments on Reddit that are new since your last visit.
// @author Chris H (Zren / Shade), Nathan Sweet
// @icon https://reddit.com/favicon.ico
// @namespace http://xshade.ca
// @version 1
// @include /https?:\/\/((www|pay|[a-z]{2})\.)?reddit\.com\/r\/[a-zA-Z0-9]+\/comments\/.*/
// @grant GM_addStyle
// ==/UserScript==
@NathanSweet
NathanSweet / Gimp-gimp_spine.py
Last active Feb 8, 2018
Gimp script to export to Esoteric Software's Spine: http://esotericsoftware.com/
View Gimp-gimp_spine.py
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
@NathanSweet
NathanSweet / Illustrator-LayersToPNG.jsx
Last active Oct 15, 2018
Adobe Illustrator script to export to Esoteric Software's Spine: http://esotericsoftware.com/
View Illustrator-LayersToPNG.jsx
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
@NathanSweet
NathanSweet / Photoshop-LayersToPNG.jsx
Last active Jun 28, 2019
Adobe Photoshop script to export to Esoteric Software's Spine: http://esotericsoftware.com/
View Photoshop-LayersToPNG.jsx
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
@NathanSweet
NathanSweet / code.css
Last active Aug 29, 2015
Generic language syntax highlighting for Hyperlight, which is a PHP-based syntax highlighter: http://code.google.com/p/hyperlight/ Tested with: Java, C#, JavaScript, AS3, C, C++, Lua
View code.css
.code {
font-family: Consolas, 'Lucida Console', monospace;
font-size: 85%;
line-height: 1.5em;
color: #000;
border: 1px solid #DBDBDB;
padding: 0.5em;
margin-bottom: 1.25em;
white-space: nowrap;
max-height: 600px;
@NathanSweet
NathanSweet / astar for libgdx
Last active Aug 2, 2019
A* for libgdx that is simple but optimized, includes runnable demo. Uses a binary heap for the open list. Nodes are cached in a PathNode[], which is also used to make finding a node in the open list fast. A "run id" is used to avoid needing to clear the nodes for a new run.
View astar for libgdx
// A* for libgdx that is simple but optimized.
package test;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
@NathanSweet
NathanSweet / svn-to-git
Last active Jun 6, 2018
Migrates multiple SVN repos to Git, without anything fancy (no Ruby, no dependencies, no issues with Cygwin paths). Works with GitHub or any Git repo.
View svn-to-git
Migrates multiple SVN repos to Git, without anything fancy (no Ruby, no dependencies, no issues
with Cygwin paths). SVN tags are created as Git tags and properly pushed to the Git repo. To run:
1) Edit run-authors.sh to have your SVN repos. Run it to get an authors.txt file.
2) Edit the authors.txt to have the names and emails if you like. You must use GitHub user email
addresses if you want contributions to be associated with GitHub accounts.
3) Edit run-convert.sh to have your SVN repos and project name (for local temp directories). Run it.
You can’t perform that action at this time.