Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDc7fQwHn2JX83aZcU0wboDuiiAnEgODkXIoNJ7+86ywkTet+5IU3vrE0Zjw4fyycUKQta3WWQEr7qX5l+AEUusBlDNyjWgfZEAtT1tqnou436WNyJAmkhLQsEpPwV0k68SXo8DW9OZu5RQzL26vE0fvgi+nC/Zy0ptPC+WdgrrmGVt7IHhxxaL682Rzp+wCwKiwz6yefNCE56LADsJMQREfLh9Sn/1Qmuid22ztaig0/cisJfqhfPfbxIFC7HqVXDF3HyZVZjEbOVra5hL2U+CAW3TeceHnvHZYHRkHPD/Yoe0buzXNFfcP56ZJHshXGR4b+bfUdrbyH/Td0qFr0IjKrNg4PJ6RcBOwlwBAbCxWlR3lJijc7v00SbwgQVToy9heHbCYuX+TYVqWap9lc04fv68MRE9bwXwC4Mt81y0OXoh/kr+iwei3vOubYVfAdskBTtTADXu8Xxy8cZMuPZF3dW3pMjgmoxhu4+q9Pr0CMWid0pExakJsbv88gg2LPaFgb+9WxPcfhYwr/zB12omHzl1igqn/sDj30zUDz8MSCEJZTDqTbS4KjipHmp6/UXiWUkd0AI49sfnka7oDIciHoNJicgMxIA7jW+yK6aVDekCW3drdaqkQnVqH39OPMlxC1im4fEyu+ZvlHnUfMmVxpapKbBHS0WDXLYGiBX87w== ethan@SILICON
#InstallKeybdHook
setmousedelay -1
setbatchlines -1
*F2::
BlockInput, MouseMove
Click
Loop
{
datatype instr = halt | plus of int * int | minus of int * int * int;
exception invalid;
(* Decode list/program from int *)
local
fun decode_pair x = let
fun h pos 0 = raise invalid
| h pos n = if n mod 2 = 0 then h (pos + 1) (n div 2) else (pos, n div 2)
in h (Int.toLarge 0) x end
#! /bin/bash
#Starts MC Servers
# server.conf format:
# mem
# ramdisk
# parm
# prelaunch
@ictrobot
ictrobot / client.gradle
Created October 29, 2017 18:45
Cubes - Separate out client dependencies
task cubesDist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.java.outputDir)
from files(sourceSets.main.output.resourcesDir)
from { configurations.compile.resolvedConfiguration.resolvedArtifacts.findResults { it.id.componentIdentifier instanceof ProjectComponentIdentifier ? zipTree(it.getFile()) : null }}
from files(project.assetsDir)
archiveName = 'client.jar'
manifest {
attributes 'Main-Class': project.mainClassName
@ictrobot
ictrobot / four in a row.py
Last active May 5, 2017 11:03
Four in a row
# The MIT License (MIT)
#
# Copyright (c) 2017 Ethan Jones
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
(lambda file:(lambda file, pos: [len(file.read(1)) == 0, file.seek(pos)][0])(file, file.tell()))

Lambda returns if file is at eof

#How it works:

len(file.read(1)) == 0

Trys to read one character and checks if the returned string has a length of 0 (if you read a file at eof you get a zero length string).

-XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining

Keybase proof

I hereby claim:

  • I am ictrobot on github.
  • I am ictrobot (https://keybase.io/ictrobot) on keybase.
  • I have a public key whose fingerprint is 16D6 B17C C26B 4D58 3CAD 6E45 503E 5145 5821 C470

To claim this, I am signing this object:

package ethanjones.statistics;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;