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 / 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 / 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 / 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 / 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 / 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 / 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 / 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: