Skip to content

Instantly share code, notes, and snippets.

View Noy's full-sized avatar

Noy

  • London, U.K.
View GitHub Profile
package com.chasechocolate.example;
import java.lang.reflect.Field;
import java.util.HashMap;
import net.minecraft.server.v1_6_R2.DataWatcher;
import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R2.Packet205ClientCommand;
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
package me.noy.javabasics.advanced;
import java.util.Scanner;
/**
* @author Noy Hillel, give credit Nick.
* Kidding, love you.
*/
public final class AdvancedCalculator {
@Noy
Noy / this.this
Last active December 11, 2016 02:56
this?
universal studentroom this extends this impliments that, there {
this this = new this<this>(this);
void <THIS> this(THIS this) {
while(this) {
return new this(this);
}
if (this.this(this)) applyNewThis(this);
}
@Noy
Noy / main.go
Created January 25, 2017 19:10
Had a ton of files that were actually photos but didn't have the extension, this'll fix that if you ever have that problem.
package main
import (
"io/ioutil"
"log"
"os"
"math/rand"
"time"
)
@Noy
Noy / ohno!.html
Last active April 5, 2017 16:28
OH NO!
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<title>HELP</title>
</head>
<body id="lol">
<center><h1 id="haha" style="font-family: 'Roboto', sans-serif;"></h1></center><br>
<script type="text/javascript">
All commands start with a >
>help - the help command
>wouldyou, haveyou, willyou (random responses)
Updated from time to time..
@Noy
Noy / restfulapi.go
Last active May 22, 2017 10:04
RESTful API Example
package main
import (
"github.com/gorilla/mux"
"log"
"net/http"
"encoding/json"
)
// Our person struct, (a collection of data representing a person
$(document).ready(function () {
function exportTableToCSV($table, filename) {
var $rows = $table.find('tr:has(td),tr:has(th)'),
tmpColDelim = String.fromCharCode(11),
tmpRowDelim = String.fromCharCode(0),
colDelim = '","',
rowDelim = '"\r\n"',
csv = '"' + $rows.map(function (i, row) {
var $row = $(row), $cols = $row.find('td,th');
return $cols.map(function (j, col) {
package mongo
data class Address(var city: String, var country: String)
data class Review(var userName: String, var rating: Double) {
init {
if ((rating < 0) || rating >10) {
throw RatingException("Ratings need to be between 0 and 10")
}
}
class S { override fun toString(): String {return "s"} }
class Q { override fun toString(): String { return "q"} }
class U { override fun toString(): String {return "u"} }
class A{ override fun toString(): String { return "a"} }
class D{ override fun toString(): String { return "d"} }
class s{ override fun toString(): String { return "s"} }
fun squads() {
val S = S().toString()