Skip to content

Instantly share code, notes, and snippets.

View octylFractal's full-sized avatar
🦞
trans rights

Octavia Togami octylFractal

🦞
trans rights
View GitHub Profile
@octylFractal
octylFractal / QuadraticAndStuff.java
Created May 29, 2015 04:38
All quadratics solver in Java 8 or above.
package examples;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Scanner;
public class QuadraticAndStuff {
private static final Complex _0 = new Complex(0, 0);
private static final String[] INPUTCHARS = { "a", "b", "c" };
You are seeing this message because an event callback was injected by the Event
Injection Subsystem but the specified callback method was not defined. The
details of the missing callback are as follows:
Event Name: onplayerdigging
Cancellable: true
Callback class: net.minecraft.network.play.client.C07PacketPlayerDigging
Foo foo = new AutoValue_Foo.Builder().list(new ArrayList<String>()).build();
List<String> listNoWildcard = (List<String>) foo.list();
List<? extends String> listWithWildcard = foo.list();
Stream<? extends string> s = listWithWildcard.stream();
// alright, let's reduce this
s.reduce("", new BinaryOperator<String>() {
// error: The method reduce(capture#3-of ? extends String, BinaryOperator<capture#3-of ? extends String>)
// in the type Stream<capture#3-of ? extends String> is not applicable for the arguments
// (String, new BinaryOperator<String>(){})
import java.io.*;
import java.nio.*;
import java.nio.file.*;
public class Encode {
private static final byte INIT_BYTE = (byte) 0x17;
private static final byte ESCAPE_BYTE = (byte) 0x18;
private static final byte EXIT_BYTE = (byte) 0x19;
public static void main(String[] args) throws Exception {
try (InputStream in = System.in; OutputStream out = Files.newOutputStream(Paths.get("./encoded.jar"))) {
int read = -1;
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif en0
src 10.133.72.124 port 61844
dst 10.3.1.7 port 443
rank info not available
TCP aux info available
Connection to 10.3.1.7 port 443 [tcp/https] succeeded!
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owEBRAG7/pANAwACAV0gCzJeFXqBAcsUYgBV0oxMZnVjayB5b3VyIGF1dGiJARwE
AAECAAYFAlXSjEwACgkQXSALMl4VeoFnpAgAumudoRUKHeQFE0gvFO7nd0tbuLVn
VmuDqmHPnV6ZxdnISZK8p34ybizwcS9yJgD3x3UZ4fhg13TLiXbj5tmKqU7mZEfm
YuQy0LWOupeF2nrxe8wn3xkKmc/YiS7Oq9DX135juqObYEVqcmcjbwP2jx/qhGzR
zEY3Ev8y7M6lKV+cQbRjkvIHgwHO/N97IrCDOG04lYAemOZrfQdRbOOeQPDm5dLH
Ny/VVa6ZvjBZFqLSKUL8QgO7svbMp0S7YlqXb0Y8X9nohR3uytO4sm6FLIe39Y0t
+hehb4NTqJQyU0ETd8qD2tab9Ja0Uu6GUXJDq+8al8s50GFUKCxjYXlVNg==
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owEBOgHF/pANAwACAV0gCzJeFXqBAcsKYgBV0oyFdGVzdIkBHAQAAQIABgUCVdKM
hQAKCRBdIAsyXhV6gSrgB/wNmpK4F0gRc5L+0ddB8hopOmyPFYt7E75lc6sfUUeP
THTzrfuTz/B5J4QyZE7wP+CMh3bf2Xa5/rYPM/zcEjOS48eNunbkRHOLffO4FdmH
jQoK0UMX1fge7J3YgXEoeiJE5UYMNZ69JtMvhrjI9JGYofHB0UDUaZrJU8qguSBb
y5MjvjyVB1tvLvOs1hRkRIspOO0Hacf5hoxBo/O7ZNrgSgx3muiD21jnb4iKGI/q
5ubjnBZJX1lhomBmY6T4vhDejpJiMFq7m2rUhl+RRikeCOvBgq5fIj/R1OFvHCsO
LAAYqExkMk1EXDjiLXwzwFp/GQvfPBoebNx6Wt/IuAUc
@octylFractal
octylFractal / choice.py
Last active October 27, 2015 05:30
random.choice for your shell
#!/usr/bin/env python3
#
# Used for choice in shell! Do not delete.
#
import sys
import random
args = sys.argv[1:]
if not args:
print('Usage: {} <args>'.format(sys.argv[0]))
sys.exit(1)
@octylFractal
octylFractal / git-nocomment.sh
Last active November 17, 2015 07:49
for when you have no good comment
#!/usr/bin/env bash
git commit "$@" -m "$(curl -s http://whatthecommit.com/index.txt)"
exit $?
I look at you all see the Forge there that's sleeping
While my processor gently weeps
I look at the RAM and I see it needs sweeping
Still my processor gently weeps

I don't know why nobody told you
How to setupDecompWorkspace
I don't know how someone misled you
They bought and sold you