Skip to content

Instantly share code, notes, and snippets.

Rudie Dirkx rudiedirkx

Block or report user

Report or block rudiedirkx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View multiplayer.html
<!doctype html>
<html lang="en">
<head>
<title>Multiplayer</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=300, height=500, initial-scale=1" />
<style>
* { box-sizing: border-box; font-size: 20px; font-family: arial; margin: 0; padding: 0; }
html { height: 100%; border: solid 20px black; }
View dabblet.css
html, body, .container {
margin: 0;
height: 100%;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
width: 33%;
@rudiedirkx
rudiedirkx / livelong.php
Created Oct 15, 2014
End request, but keep going (Apache)
View livelong.php
<?php
_liveLongStart();
echo "Processing the hell outta everything....\n";
echo "\n";
echo "We'll email you as soon as this is done.\n";
_liveLongEnd();
@rudiedirkx
rudiedirkx / drupal.placeholder.js
Created Oct 24, 2014
Drupal placeholder polyfill
View drupal.placeholder.js
(function ($) {
Drupal.behaviors.placeholderScripts = {
attach: function(context, settings) {
/**
* Placeholder support
*/
if ( !('placeholder' in document.createElement('input')) ) {
function onFocus(e) {
View Lemmings.txt
http://www.elizium.nu/scripts/lemmings/
Fun
1. BAJHLDHBCL
2.
View drupal-dependencies.log
Every 1.0s: php summary.php Wed Feb 18 00:12:37 2015
29 687 projects downloaded.
10 015 of those have a 7.x release.
Parsed 602 modules' dependencies.
167 of those have NO dependencies.
0 projects FAILED to download INFOS.
View websockets.bookmarket.js
javascript:
(function() {
WebSocket.sockets || (WebSocket.sockets = []);
var s = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
if (!this._oh) {
this._oh = 1;
WebSocket.sockets.push(this);
this.addEventListener('message', function(e) {
console.log('receive', e.data);
View youtube-zoom.bookmarklet.js
(function() {
var _x, _y;
function scroll(video) {
var x = _x / innerWidth;
var dx = 1.1 * (-innerWidth/2*x + innerWidth/4);
video.style.marginLeft = Math.round(Math.max(-innerWidth/4, Math.min(innerWidth/4, dx))) + 'px';
var y = _y / innerHeight;
View trace.js
function getTrace() {
try {
throw new Error;
}
catch (ex) {
var matches = [];
ex.stack.replace(/([^\s]+):(\d+):(\d+)/g, function(all, file, line, column) {
file = file.replace(/^[\s\(]/g, '');
matches.push({"file": file, "line": line, "column": column});
View page-load-time.bookmarklet.js
javascript:
alert("domready: " + (performance.timing.domContentLoadedEventEnd - performance.timing.navigationStart) + " ms\nonload: " + (performance.timing.loadEventEnd - performance.timing.navigationStart) + ' ms');
void(0);
You can’t perform that action at this time.