Skip to content

Instantly share code, notes, and snippets.

View activedecay's full-sized avatar

chunk activedecay

View GitHub Profile
Copyright (c) 2013 Matt Bertolini
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
The MIT License
Copyright (c) 2010, InfraDNA, Inc.
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:
ANTLR 2 License
We reserve no legal rights to the ANTLR--it is fully in the public domain. An
individual or company may do whatever they wish with source code distributed
with ANTLR or the code generated by ANTLR, including the incorporation of
ANTLR, or its output, into commerical software.
We encourage users to develop software with ANTLR. However, we do ask that
credit is given to us for developing ANTLR. By "credit", we mean that if you
use ANTLR or incorporate any source code into one of your programs (commercial
@activedecay
activedecay / Iterators.java
Created March 13, 2017 20:23
why aren't itardators itardabtable? oh cuz java.
public static <T> Iterable<T> in(final Iterator<T> iterator) {
assert iterator != null;
class SingleUseIterable implements Iterable<T> {
private boolean used = false;
@Override
public Iterator<T> iterator() {
if (used) {
throw new IllegalStateException("SingleUseIterable already invoked");
@activedecay
activedecay / some_hp.js
Last active August 29, 2015 14:04
HP ILO steals window.opener
<!--
This is a bit of code from HP that proves they are crooks.
They stole the window.opener by changing its location
and then closed the window that it intended to launch.
Why?
-->
<script language="JavaScript" type="text/javascript">
//--- create the new location string with
//--- cpqlogin.php and the original query string