Skip to content

Instantly share code, notes, and snippets.

View subnomo's full-sized avatar
🏠
Working from home

Alex subnomo

🏠
Working from home
View GitHub Profile
@subnomo
subnomo / games.py
Created June 11, 2014 15:52
A bunch of games written in Python.
def rock():
from random import randrange
import sys
'''Chooses random number and then assigns either rock, paper,
or scissors to variable "choice" depending on number. Returns choice.'''
def rps():
num = randrange(1, 4, 1)
if num == 1:
choice = 'Rock'
elif num == 2:
@subnomo
subnomo / AlbumRip.js
Created June 13, 2014 04:26
An album ripper written in Javascript. Requires NodeJS and several modules to run.
var async = require('async');
var cheerio = require('cheerio');
var fs = require('fs');
var mkdirp = require('mkdirp');
var progressbar = require('progress');
var prompt = require('prompt');
var request = require('request');
if (!fs.existsSync('images')) {
mkdirp('images');
@subnomo
subnomo / Nanite.java
Last active November 18, 2016 19:30
A robocode robot I wrote in high school.
package subnomo;
import robocode.AdvancedRobot;
import robocode.HitByBulletEvent;
import robocode.RobotDeathEvent;
import robocode.ScannedRobotEvent;
import robocode.util.Utils;
import java.awt.*;
import java.awt.geom.Point2D;
@subnomo
subnomo / crunchyRes.user.js
Last active August 3, 2019 13:41
Edited Zren's Crunchyroll Userscript to better display each resolution
// ==UserScript==
// @name Crunchyroll: Resize Player To Window Size
// @description Moves the video to the top of the website and resizes it to the screen size.
// @author Chris H (Zren / Shade)
// @icon http://crunchyroll.com/favicon.ico
// @homepageURL http://userscripts.org/scripts/show/157272
// @downloadURL http://userscripts.org/scripts/source/157272.user.js
// @updateURL http://userscripts.org/scripts/source/157272.meta.js
// @namespace http://xshade.ca
// @version 1.1.1
@subnomo
subnomo / separateGifs.py
Last active August 29, 2015 14:12
Simple Python script that separates gifs from other image types. The script deletes itself on completion.
import os
count = 0
for filename in os.listdir('.'):
if filename == 'separateGifs.py':
continue
elif os.path.isdir(filename):
continue
@subnomo
subnomo / separateAllGifs.py
Last active August 14, 2016 15:28
Made another version of previous script, this one moves gifs from all folders in current directory into "gifs" folders in their respective directories. (Does that sentence make sense?)
import os
count = 0
for folder in os.listdir('.'):
if not os.path.isdir(folder):
continue
for filename in os.listdir('./' + folder):
oldPath = './' + folder + '/' + filename
@subnomo
subnomo / GameOfLife.java
Created April 21, 2015 16:59
Game of Life
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class GameOfLife extends JPanel implements ActionListener, Runnable {
@subnomo
subnomo / tinder-api-documentation.md
Last active August 29, 2015 14:26 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

@subnomo
subnomo / SimpleJSON.cs
Last active October 16, 2016 06:33
SimpleJSON from http://wiki.unity3d.com/index.php/SimpleJSON with added support for long datatype
//#define USE_SharpZipLib
#if !UNITY_WEBPLAYER
#define USE_FileIO
#endif
/* * * * *
* A simple JSON Parser / builder
* ------------------------------
*
* It mainly has been written as a simple JSON parser. It can build a JSON string
* from the node-tree, or generate a node tree from any valid JSON string.
@subnomo
subnomo / keybase.md
Last active March 1, 2016 13:23
Keybase proof ...stuff

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: