Skip to content

Instantly share code, notes, and snippets.

View phantamanta44's full-sized avatar

phantamanta44

View GitHub Profile
@phantamanta44
phantamanta44 / gabequery.js
Last active August 29, 2015 14:24
Too lazy to do proper formatting in droidedit
function GabeN(ratio, imageurl) {
this.ratio = ratio;
this.imageurl = imageurl
}
var getGabeN = {
init: function(myGabeN) {
this.myGabeN = myGabeN
},
horizontal: function() {
return this.myGabeN.filter(function(myGabeN) {
@phantamanta44
phantamanta44 / Fibonacci.java
Created July 13, 2015 23:04
Small challenge
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.Date;
import java.math.BigInteger;
public class Fibonacci {
public static void main(String[] args) {
int length, starting = 1;
@phantamanta44
phantamanta44 / cards-against-benc.json
Created March 13, 2016 23:25
a cah pack from that one tumblr post
{"name":"Cards Against ben-c","description":"Created with CAH Creator: cahcreator.com","expansion":true,"blackCards":[],"whiteCards":["A small bee fluent in German.","A large angry ground squirrel.","A literal fruit.","A quietly sobbing parakeet.","A sexually active Toyota Prius.","Slightly sad oatmeal.","Emotionally compromised.","Actually about 12.","Oops.","The entire state of Louisiana.","A malpracticing veterinarian.","Definitely a heterosexual.","Loose fitting cashmere socks.","Probably not Captain America.","Very grim cheddar cheese.","The smell of paprika.","The Official Bread Pudding.","Frustratingly tangled Siran wrap.","Dead, but only ironically.","Absolutely not cereal.","Not a tiny child named Joe.","An extremely judgmental hat.","Several very small mangoes.","At least 7.","Generally disinterested.","A too-cheery anime protagonist.","A suspicious-looking plant.","Obnoxious Google autofill.","The sound of 12 tiny pelicans.","A vintage oil painting of you.","A large city in Scandonavia.","NUMBAH ON
@phantamanta44
phantamanta44 / ponies.json
Created March 19, 2016 00:48
list of ponies with picture urls, pulled from the mlp wiki
{
"Mummy Dude": "http://vignette2.wikia.nocookie.net/mlp/images/d/d8/UES0_ID_S4E20.png/revision/latest?cb=20160223225140",
"Hoops": "http://vignette4.wikia.nocookie.net/mlp/images/e/e5/Hoops_colt_ID_S1E23.png/revision/latest?cb=20140622154733",
"Colonel Purple Dart": "http://vignette1.wikia.nocookie.net/mlp/images/6/61/Colonel_Purple_Dart_ID_S4E21.png/revision/latest?cb=20140407193551",
"Harry Trotter": "http://vignette4.wikia.nocookie.net/mlp/images/c/c9/Yellow_pony_with_glasses_and_scarf_S02E26.png/revision/latest?cb=20120618212030",
"Gala Appleby": "http://vignette2.wikia.nocookie.net/mlp/images/7/70/Gala_Appleby_Crystal_Pony_ID_S4E25.png/revision/latest?cb=20140513034445",
"Nimble Thimble": "http://vignette1.wikia.nocookie.net/mlp/images/b/b9/My_Little_Pony_G4_logo.svg/revision/latest?cb=20110926103915",
"Cobalt": "http://vignette3.wikia.nocookie.net/mlp/images/1/18/Cobalt_ID_S2E26.png/revision/latest?cb=20120717020504",
"Crescent Moon": "http://vignette3.wikia.nocookie.net/mlp/images/6/6e/Crescen
@phantamanta44
phantamanta44 / matrix.py
Created July 21, 2016 23:12
somewhat fancy printing
#!/usr/bin/env python
from sys import stdin, stdout, exit
from math import floor
from random import randint, choice
from time import sleep
def randChar():
return unichr(65382 + randint(0, 55))
#pragma config(Sensor, dgtl1, f1c, sensorTouch)
#pragma config(Sensor, dgtl2, f2c, sensorTouch)
#pragma config(Sensor, dgtl3, f3c, sensorTouch)
#pragma config(Sensor, dgtl4, s, sensorSONAR_cm)
#pragma config(Sensor, dgtl7, f1i, sensorLEDtoVCC)
#pragma config(Sensor, dgtl8, f2i, sensorLEDtoVCC)
#pragma config(Sensor, dgtl9, f3i, sensorLEDtoVCC)
#pragma config(Motor, port2, d1, tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
@phantamanta44
phantamanta44 / parseponies.js
Last active January 25, 2017 23:44
Pulled from the MLP wiki.
function mR2H(rgb){
rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
return (rgb && rgb.length === 4) ? "#" +
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';
}
var mPonyList = $("tbody:last");
var mResults = {};
mPonyList.children().each(function(mI, mRowJr) {
@phantamanta44
phantamanta44 / empoleon-drill-peck.txt
Created February 8, 2017 16:56
EMPOLEON, USE DRILL PECK
DRILL PECK I (Empoleon) @ Sharp Beak
Ability: Defiant
EVs: 252 Atk / 252 Spe
Adamant Nature
- Drill Peck
- Drill Peck
- Drill Peck
- Drill Peck
DRILL PECK II (Empoleon) @ Sharp Beak
#pragma config(Sensor, in1, l, sensorReflection)
#pragma config(Motor, port1, f, tmotorVexFlashlight, openLoop, reversed)
#pragma config(Motor, port2, g, tmotorServoStandard, openLoop)
#pragma config(Motor, port3, b, tmotorServoStandard, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
// CONFIG
int kBinSteel = 100; // The servo angle for the steel marble bin
int kBinYellow = -80; // The servo angle for the yellow marble bin
@phantamanta44
phantamanta44 / FizzBuzz.java
Created May 8, 2017 20:34
sort of inefficient fizzbuzz implementation in java
public class FizzBuzz {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
int n = Integer.parseInt(args[i]);
String out = ((n % 3) == 0 ? "Fizz" : "") + ((n % 5) == 0 ? "Buzz" : "");
System.out.println(out.isEmpty() ? Integer.toString(n) : out);
}
}
}