Skip to content

Instantly share code, notes, and snippets.

View jantman's full-sized avatar
💭
I have a status.

Jason Antman jantman

💭
I have a status.
View GitHub Profile
@datagrok
datagrok / if_i_ran_the_company.md
Last active January 14, 2019 07:36
If I ran a company, what would it look like?

The article previously hosted at this location is now published on my website: If I Ran The Company.

@ryankearney
ryankearney / ComcastInject.html
Last active June 10, 2023 14:40
This is the code Comcast is injecting into its users web traffic.
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2012.
// Intended use is to display browser notifications for critical and time sensitive alerts.
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do';
// var image_url='http://servicealerts.comcast.net:8080/images/mt';
var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images';
var headertext1='<strong>Comcast Courtesy Notice</strong>';
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.';
var textline2='Please sign in for more information and to remove this alert.';
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login&paramName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>';
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@mildmojo
mildmojo / gist:2044883
Created March 15, 2012 15:45
Add Firefox buttons to manipulate about:config settings
/*
I needed a button in the Firefox UI to toggle the default page zoom level
setting offered by the NoSquint extension (shown as "extensions.nosquint.fullZoomLevel"
in about:config). Since this isn't likely to be provided directly and I
wasn't interested in writing my own extension for something so simple, I
looked for an extension that would expose about:config settings to buttons.
Instead, I found the Custom Buttons extension:
@founddrama
founddrama / VersionComparator.groovy
Last active April 20, 2023 12:55
a version comparator (e.g., "1.0.2" < "1.0.10")
def versions = []
def f = new File('mock-version-tags.txt')
f.eachLine { versions << it }
def versionComparator = { a, b ->
def VALID_TOKENS = /._/
a = a.tokenize(VALID_TOKENS)
b = b.tokenize(VALID_TOKENS)
for (i in 0..<Math.max(a.size(), b.size())) {