Skip to content

Instantly share code, notes, and snippets.

View gist:04a8ef9158c8c0e96625c26141f26c2d
# https://github.com/uBlockOrigin/uAssets/pull/3517
twitch-videoad.js application/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var realFetch = window.fetch;
window.fetch = function(input, init) {
if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) {
var url = new URL(arguments[0]);
url.searchParams.forEach(function(value, key) {
url.searchParams.delete(key);
View bs.pl
#!env perl -l
use strict;
use warnings;
my @words = map { chomp; s/\s//; $_ } <DATA>;
print join '', map { splice @words, rand @words, 1 } (1 .. shift || 10);
__DATA__
Strategy
View water_bucket.json
{
"textures": {
"bucket": "blocks/iron_block",
"liquid": "blocks/water_still"
},
"elements": [
{ "comment": "top outer - west",
"from": [ 0, 9, 2 ],
"to": [ 1, 16, 14 ],
"faces": {
View gist:6682223
> packageDeclaration
DATA: package
> qualifiedName
DATA: nl
DATA: .
DATA: grum
DATA: .
DATA: grummifier
< qualifiedName
DATA: ;
View gist:6673719
foo(foo(1,2,2,4));
foo(
foo(
1,
2,
2,
4
)
);
View gist:3918312
// Meh first version is saner
interface Location extends Position, BlockLocation {
}
interface BlockLocation extends BlockPosition, Locatable {
}
interface Locatable {
World getWorld();
View gist:822288
erikbroes@db-dev1:~/src/WhoisParentPOM (master)$ rm -rf /home/erikbroes/.m2/repository/; ../tools/apache-maven-3.0.2/bin/mvn -X clean
Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
Java version: 1.6.0_07, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun-1.6.0.07/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.24-etchnhalf.1-amd64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /home/erikbroes/src/tools/apache-maven-3.0.2/conf/settings.xml
[DEBUG] Reading user settings from /home/erikbroes/.m2/settings.xml
[DEBUG] Using local repository at /home/erikbroes/.m2/repository
View gist:764139
package org.bukkit;
import java.io.ObjectInputStream.GetField;
/**
* Represents the inventory
* @author Grum
*/
public interface Inventory {
/**
View gist:724037
2010-12-01 20:11:46 [WARNING] Failed to handle packet: java.lang.NullPointerException
java.lang.NullPointerException
at ep.a(SourceFile:1048)
at ew.b(SourceFile:42)
at jh.a(jh.java:109)
at hc.a(SourceFile:126)
at bi.a(SourceFile:223)
at jh.a(jh.java:42)
at dr.a(dr.java:76)
at net.minecraft.server.MinecraftServer.h(SourceFile:269)
View gist:719898
private void f(eo parameo, int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
// if what (eo, x, y, z )
if (l(parameo, paramInt1, paramInt2, paramInt3)) {
// blockId = eo.getBlockId(x,y,z)
int i = parameo.a(paramInt1, paramInt2, paramInt3);
// if not air
if (i > 0) {
// if this is lava
if (this.bs == jw.g) {
// make lava noises! (where does it set to obsidian/cobble?