I hereby claim:
- I am PunKeel on github.
- I am punkeel (https://keybase.io/punkeel) on keybase.
- I have a public key whose fingerprint is 0216 8B4D 30F6 BD17 4A19 85EC FF57 EC5B 089B B801
To claim this, I am signing this object:
| <?php | |
| $confidence = 75; | |
| $db_prefix = 'forum'; | |
| function check_user($u) { | |
| $details = array('username' => urlencode($u['username']), 'email' => urlencode($u['email']), 'ip' => $u['lastip']); | |
| $url = "http://www.stopforumspam.com/api?ip={$details['ip']}&email={$details['email']}&username={$details['username']}&f=json"; | |
| $data = @file_get_contents($url); | |
| $data = json_decode($data); |
| #!/bin/bash | |
| echo "real_ip_header CF-Connecting-IP;">/etc/nginx/cf_rules.conf; | |
| for f in $(curl "https://www.cloudflare.com/ips-v4"); do | |
| echo "set_real_ip_from $f;">>/etc/nginx/cf_rules.conf; | |
| done | |
| for f in $(curl "https://www.cloudflare.com/ips-v6"); do | |
| echo "set_real_ip_from $f;">>/etc/nginx/cf_rules.conf; | |
| done |
I hereby claim:
To claim this, I am signing this object:
| function retry(isDone, next) { | |
| var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
| var id = window.setInterval( | |
| function() { | |
| if (isDone()) { | |
| window.clearInterval(id); | |
| next(is_timeout); | |
| } | |
| if (current_trial++ > max_retry) { | |
| window.clearInterval(id); |
| #!/usr/bin/env python3 | |
| # cat /usr/local/sbin/taskgraph.py | |
| # https://gist.github.com/punkeel/e84cf1e55995d98d6d7a9822e401f74b | |
| # Little script to display TaskWarrior tasks in a graph, along with their dependencies | |
| # alias td='rm -f ~/tasks.png; task export status:pending | ~/taskgraph.py > ~/tasks.png && echo Saved tasks graph to ~/tasks.png' | |
| import json | |
| import sys | |
| import textwrap |
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL6JkY1+F5FH7VL4eTERYuEfF+8HOFMs76IhiBuQX6cXJVB/RpF7qJzeB/ZmyV4r/CH/yIun62vxeO1frpqUQkA= [email protected] |
SW-2313-2899-1404
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |