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
#!/usr/bin/env bash
set -e
ref="$(git symbolic-ref HEAD)"
branch="${ref#refs/heads/}"
tmp=tmp$RANDOM
git checkout --orphan $tmp
git rm -r -f .
git commit --allow-empty -m "Remove everything. Completely."
git checkout "$branch"
git reset --hard "$tmp"
@octylFractal
octylFractal / its.md
Last active February 16, 2016 01:27
HTTP it

100

  • 100 continue it
  • 101 switch it
  • 102 process it

200

  • 200 got it
  • 201 create it
  • 202 accept it
  • 203 not quite it
public class IsNumeric {
public boolean isNumeric(String whatever) {
try {
Integer.parseInt(whatever);
return true;
} catch (Exception e) {
return false;
}
}
}
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
@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 $?
@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)
-----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
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owEBRAG7/pANAwACAV0gCzJeFXqBAcsUYgBV0oxMZnVjayB5b3VyIGF1dGiJARwE
AAECAAYFAlXSjEwACgkQXSALMl4VeoFnpAgAumudoRUKHeQFE0gvFO7nd0tbuLVn
VmuDqmHPnV6ZxdnISZK8p34ybizwcS9yJgD3x3UZ4fhg13TLiXbj5tmKqU7mZEfm
YuQy0LWOupeF2nrxe8wn3xkKmc/YiS7Oq9DX135juqObYEVqcmcjbwP2jx/qhGzR
zEY3Ev8y7M6lKV+cQbRjkvIHgwHO/N97IrCDOG04lYAemOZrfQdRbOOeQPDm5dLH
Ny/VVa6ZvjBZFqLSKUL8QgO7svbMp0S7YlqXb0Y8X9nohR3uytO4sm6FLIe39Y0t
+hehb4NTqJQyU0ETd8qD2tab9Ja0Uu6GUXJDq+8al8s50GFUKCxjYXlVNg==
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!
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;