Skip to content

Instantly share code, notes, and snippets.

@kylestev
kylestev / JavaScript Injection
Created May 23, 2012 03:50
JavaScript injection into HTML documents using Fiddler
import Fiddler;
class Handlers {
static var injectJs = "<script>alert('I see you enjoy YouTube.')</script>";
static var hostList = new HostList("*.youtube.com");
static function OnBeforeResponse(oSession : Session) {
// Filter to only HTML documents and on the domains we want
if (hostList.ContainsHost(oSession.hostname) && oSession.oResponse.headers.ExistsAndContains("Content-Type", "text/html")) {
oSession.utilDecodeResponse();
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 16, 2024 12:41
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).