Skip to content

Instantly share code, notes, and snippets.

import re
# Engine
class Reddit2HTMLConverter:
def __init__(self, regPattern, formatStr, formatter):
self.regPattern = regPattern
self.formatter = formatter
self.formatStr = formatStr
using UnityEngine;
public class PausableTimer {
private float _timerStart = -1;
private float _timerTime;
public PausableTimer(float initialTimerTime = 0) {
_timerTime = initialTimerTime;
}
@TheLouisHong
TheLouisHong / ReapplyFlair.js
Created August 7, 2015 04:53
ReapplyFlair
// By /u/loolo78. Use at you will.
// Find the Flair ID by inspecting your flair selection box.
// This script unfortunatly is not very "user" friendly.
//
var flairs = document.getElementsByClassName('flairselectbtn');
var config = { attributes: true, childList: true, characterData: true, subtree: true };
function wait(index){
var temp = flairs[index].parentElement.getElementsByClassName('flairselector drop-choices active')[0];
Shader "Custom/Circle" {
Properties
{
_Scale("Scale", Float) = 1
}
SubShader{
Blend SrcAlpha OneMinusSrcAlpha
Pass{
CGPROGRAM
#pragma vertex vert
@TheLouisHong
TheLouisHong / ReadFile.java
Last active December 22, 2015 00:48
A program that reads unknown Serialized objects, with problems,.....
package com.louishong;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.Field;
public class ReadFile{
@TheLouisHong
TheLouisHong / CharCheck.java
Created October 17, 2013 03:44
Martino'w HW
import java.util.Scanner;
public class CharCheck {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
System.out.println("Begin!");
while (true) {
char input = keyboard.next().charAt(0);
if (isDigit(input)){
@TheLouisHong
TheLouisHong / PrintOneOverN
Created October 17, 2013 15:41
Another Martinos HW
public class PrintOneOverN {
public static void main(String[] args) {
int finalDinominator = 20;
for (double i = 1; i <= finalDinominator; i++) {
System.out.println(1d/i);
}
}
}
@TheLouisHong
TheLouisHong / WhosTheBiggest.java
Created October 17, 2013 16:36
Once again, another HW
import java.util.Scanner;
public class WhosTheBiggest {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
while (true) {
Integer[] inputs = new Integer[3];
System.out.println("Enter 3 positive digits");
try {
import java.util.Scanner;
public class WhosTheBiggest {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
while (true) {
Integer[] inputs = new Integer[3];
System.out.println("Enter 3 positive digits");
try {
@TheLouisHong
TheLouisHong / WhosTheBiggest.java
Created October 18, 2013 01:39
Once again, updated
import java.util.Scanner;
public class WhosTheBiggest {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
mainLoop:
while (true) {
Integer[] inputs = new Integer[3];