Skip to content

Instantly share code, notes, and snippets.

View diafygi's full-sized avatar

Daniel Roesler diafygi

View GitHub Profile

Keybase proof

I hereby claim:

  • I am diafygi on github.
  • I am diafygi (https://keybase.io/diafygi) on keybase.
  • I have a public key whose fingerprint is F75B E4E6 EF6E 9DD2 0367 9E94 E7F6 FAD1 72EF EE3D

To claim this, I am signing this object:

@diafygi
diafygi / index.html
Last active November 12, 2019 21:37 — forked from mbostock/.block
SKS/GPG Keyserver Gossip Network
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
fill: #bbb;
}
.node:hover {
@diafygi
diafygi / d3.v3.min.js
Created September 9, 2014 22:11
Gradient Heatmaps
!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null!=n&&!isNaN(n)}function e(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function r(n){return n.length}function u(n){for(var t=1;n*t%1;)t*=10;return t}function i(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function o(){}function a(n){return ia+n in this}function c(n){return n=ia+n,n in this&&delete this[n]}function s(){var n=[];return this.forEach(function(t){n.push(t)}),n}function l(){var n=0;for(var t in this)t.charCodeAt(0)===oa&&++n;return n}function f(){for(var n in this)if(n.charCodeAt(0)===oa)return!1;return!0}function h(){}function g(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function p(n,
@diafygi
diafygi / LICENSE.txt
Last active November 20, 2023 20:59 — forked from 140bytes/LICENSE.txt
Base58 Encoder/Decoder - slightly over 140 bytes, but still pretty useful
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@diafygi
diafygi / index.html
Last active August 29, 2015 14:02
d3 gradient heatmap
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
svg{
display:inline-block;
}
</style>
</head>
@diafygi
diafygi / LICENSE.txt
Last active August 29, 2015 13:57 — forked from 140bytes/LICENSE.txt
Bullet Spinner - an ajax-style loading spinner using padding and setInterval
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@diafygi
diafygi / hcsmp_death_status.py
Created June 21, 2012 07:15
HardcoreSMP Death Stats Example
# Written by diafygi: diafygi<at symbol>gmail<dot>com
# Released under the GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
#
# This script downloads the HardcoreSMP death list and parses it to create stats for the month.
import urllib2
import re
from datetime import datetime, timedelta
#grab hcsmp death log
@diafygi
diafygi / slow_query_log_dump.py
Created December 16, 2011 04:38 — forked from memonic/cronjob.sh
Script to transform Amazon RDS slow log table into the MySQL slow query log format
"""
Queries the slowlog database table maintained by Amazon RDS and outputs it in
the normal MySQL slow log text format. Modified version of the script by
memonic (Thanks!) at https://gist.github.com/1481025
Things to change in this script for your own setup:
<root_user> to your mysql root user (e.g. "root")
<root_pass> to your mysql root password (e.g. "hunter2")
<host_domain> to your mysql root password (e.g. "prod-01.w3rfs2.us-east-1.rds.amazonaws.com")
@diafygi
diafygi / index.html
Created November 15, 2011 23:44
Make call after transition
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<title>Delayed Call</title>
</head>
<body>
<div id="chart"></div>