Skip to content

Instantly share code, notes, and snippets.

diff --git a/WebCore/loader/appcache/ManifestParser.cpp b/WebCore/loader/appcach
index a2df825..b001bff 100644
--- a/WebCore/loader/appcache/ManifestParser.cpp
+++ b/WebCore/loader/appcache/ManifestParser.cpp
@@ -43,7 +43,8 @@ bool parseManifest(const KURL& manifestURL, const char* data,
ASSERT(manifest.explicitURLs.isEmpty());
ASSERT(manifest.onlineWhitelistedURLs.isEmpty());
ASSERT(manifest.fallbackURLs.isEmpty());
-
+ manifest.allowAllNetworkRequests = false;
#!/usr/bin/python
import urllib2
import json
import pprint
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
register_openers()
@berg
berg / gist:2651577
Created May 10, 2012 07:05
Arris TM702G counter polling script
#!/usr/bin/env python
#
# Script to poll DOCSIS downstream channel counters
# on Arris TM702G cable modems and similar
#
# licensed under creative commons CC0 (public domain)
#
import functools
@berg
berg / log.sh
Created May 10, 2012 07:08
Script to poll iptables counters
#!/bin/sh
# iptables counter poller
# released under CC0 (public domain)
while true; do
((date +%s; \
iptables -t mangle -x -L FORWARD -vvv -n \
| tail +3 \
| awk '{print $2}') \
@berg
berg / gist:2651626
Created May 10, 2012 07:13
iptables rules
# iptables rules created
# flush forward rule
iptables -t mangle -F FORWARD
# match/count synthetic traffic
iptables -t mangle -A FORWARD -d 192.168.1.3
# match/count xbox traffic
@berg
berg / poll-snmp.py
Created May 14, 2012 05:28
Script to poll SNMP counters
#!/usr/bin/env python
#
# Script to poll Ethernet interface counters from a SNMP host
# requires pysnmp and the handy snmpclient library from
# https://github.com/seveas/python-snmpclient
#
# licensed under creative commons CC0 (public domain)
#
@berg
berg / photo.md
Created July 25, 2012 01:00
Sketch of App.net image schema
import os
import time
import requests
# export ADN_PROD_TOKEN="<your access token>"
token = os.environ['ADN_PROD_TOKEN']
s = requests.Session()
s.headers['Authorization'] = 'BEARER ' + token
@berg
berg / stream-dump.py
Last active December 13, 2015 21:48
Dump an App.net stream to the console. Useful for debugging.
import sys
import time
import json
import requests
endpoint = sys.argv[1]
while True:
r = requests.get(endpoint, stream=True, timeout=600)
@berg
berg / gist:9142463
Last active March 14, 2016 19:32
Comcast and Netflix now have a direct adjacency

Comcast and Netflix now have a direct adjacency

Looked at the host serving my Netflix streams today and noticed something new.

No clue if money is changing hands or not, and the return path is what actually matters, but it appears that Comcast and Netflix have reached some sort of agreement regarding direct interconnection.

$ traceroute -a 198.45.63.164
traceroute to 198.45.63.164 (198.45.63.164), 64 hops max, 52 byte packets
    (hops 1-2 redacted)