Skip to content

Instantly share code, notes, and snippets.

View buesing's full-sized avatar

Moriz Büsing buesing

View GitHub Profile
// use like
// <GridHelper columns={12} gutterWidth={50} maxWidth={1500} />
import React, { Component } from 'react';
export default class extends Component {
constructor(props) {
super(props);
this.state = {
visible: false,
// Generated by CoffeeScript 1.4.0
(function() {
var $s, all_clusterings, data, data_source, height, k, mds, width;
$s = function(elem) {
return $(document.createElementNS('http://www.w3.org/2000/svg', elem));
};
width = $(window).width();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
enc = xmlhttp.responseText.split("\n");
for (var i = 0; i < enc.length; i++) {
ads[i].src = "data:image/jpeg;base64," + enc[i];
}
}
}
@buesing
buesing / abb1.js
Last active August 29, 2015 14:10
var ads = document.getElementsByClassName("abb");
var params = "";
for (var i = 0; i < ads.length; i++) {
params += ads[i].src + ",";
}
params = params.substr(0, params.length - 1);
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST","adblockblock.php",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("url=" + params);
@buesing
buesing / adblockblock.php
Last active August 29, 2015 14:10
AdBlock circumvention
<?php
$urls = explode(",", $_POST["url"]);
for ($i = 0; $i < count($urls); $i++) {
$result = file_get_contents($urls[$i]);
echo(base64_encode($result));
if ($i < count($urls) - 1) {
echo("\n");
}
}
@buesing
buesing / commit log
Created November 25, 2014 23:12
pae commit log
NIKO:
2014-11-25 16:25:57 +0200 Added default value for tweets.valid (= 1)
2014-11-24 19:53:10 +0200 Bad apostrophe
2014-11-24 19:44:48 +0200 Commented debug print_r
2014-11-24 19:42:38 +0200 Fixed tweet tracking timing: older tweets get restricted to the match period
2014-11-12 18:27:50 +0200 Upload generated phpdocs
2014-11-12 17:51:04 +0200 Add example tweet request server logs
2014-11-12 17:46:13 +0200 Updated database structure - recordings ( ... , finished, tracked )
2014-11-12 17:45:08 +0200 Added track resuming logic
2014-11-12 17:44:16 +0200 Wrote error/info logging function.
<!DOCTYPE html>
<html>
<style>
body { margin:0; }
canvas { display:block; }
</style>
<body>
<canvas id="canvas"></canvas>
<script type="text/javascript" charset="utf-8">
window.onload = function() {
@buesing
buesing / pingserver
Last active December 16, 2015 13:48
from socket import *
s = raw_input("listen for TCP or UDP?\n")
if s.upper() == "TCP":
tcp = socket(AF_INET, SOCK_STREAM)
tcp.setsockopt(SOCK_STREAM, SO_REUSEADDR, 1)
tcp.bind(('', 12000))
tcp.listen(1)
print("listening for TCP")
while True:
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<?php
session_start();
error_reporting(E_ALL | E_STRICT);
ini_set("display_errors", 1);