Skip to content

Instantly share code, notes, and snippets.

Avatar
🌚

Lonnen lonnen

🌚
View GitHub Profile
View socorro-07-2018-stats.txt
~/repos/socorro master
[17:39:48] $ tokei .
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Autoconf 2 1536 227 881 428
C Header 12 2195 1259 614 322
C++ 11 7342 6055 470 817
C++ Header 3 1347 1085 80 182
CSS 10 1036 937 55 44
@lonnen
lonnen / serve
Created Feb 6, 2018
serve the local directory in python
View serve
#!/usr/bin/env python
import sys, os
import SimpleHTTPServer
args = sys.argv[1:]
if len(args) and (args[0] == "-h" or args[0] == "--help"):
print """
Serve a file (or the current directory)
http://benalman.com/
@lonnen
lonnen / search.txt
Last active Dec 19, 2017
socorro rules that modify the raw_crash -- raw_crash\[(.*?)\]
View search.txt
# raw_transform ruleset
mozilla_transform_rules
ProductRewrite
ESRVersionRewrite
PluginContentURL
PluginUserComment
processor_app.py
:115 if 'uuid' not in raw_crash:
:116 raw_crash.uuid = uuid
@lonnen
lonnen / heroku-pr-cleanup.sh
Last active Feb 12, 2016
heroku pr app cleanup script
View heroku-pr-cleanup.sh
# we've been hitting a bug with PR apps under the older permissions system
# which leaves a bunch of dead ones lying around. this will clean them up.
# adjust the grep pattern and organization as necessary
for APP in `heroku apps -o $ORGANIZATION | grep -e -pr-`
do
heroku apps:destroy --app $APP --confirm $APP
done
@lonnen
lonnen / gist:a248a1ef8366d975deda
Created Oct 21, 2015
test plugincheck.m.o after migrating datacenters
View gist:a248a1ef8366d975deda
curl https://plugins.mozilla.org/en-US/plugins_list.json > before.json
# ... migration ...
curl https://plugins.mozilla.org/en-US/plugins_list.json > after.json
diff before.json after.json
View twitter.com.js
if (!window.location.pathname.startsWith('/settings')) {
var garbage = Array.prototype.slice.call(
document.getElementsByClassName('dashboard')
);
garbage.push(
document.getElementsByClassName('trends-inner')[0],
document.getElementsByClassName('wtf-module')[0]
);
@lonnen
lonnen / keybase.md
Last active Jan 2, 2020
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am lonnen on github.
  • I am lonnen (https://keybase.io/lonnen) on keybase.
  • I have a public key ASD6EwG016GSrl1Lo7eTkPdMaQ-Ck6hXv7KOflhUMv2o2Qo

To claim this, I am signing this object:

@lonnen
lonnen / curler.sh
Created Oct 10, 2014
curl a url forever
View curler.sh
# usage: ./curler.sh http://whatever.url.biz
# will run until ctr-C is executed
while [ true ]
do
curl -LI $1
done
View reroy.coffee
# Description:
# rerun a leeroy job
#
# Configuration:
# LEEROY_SERVER
#
# Commands:
# hubot rerun <project> <pull-request-#>
# hubot reroy <project> <pull-request-#>
#
View gist:10209696
https://assets.mozillalabs.com/Graphics/Wallpapers/Mozilla-is-my-Dinosaur/mozilla-dinosaur_wallpaper_1920x1200.jpg
http://i.imgur.com/HuyRINU.png bg=#e2e2e2
http://blog.seanmartell.com/wp-content/uploads/2013/09/dinosaur.png bg=#e4e4e4
https://farm4.staticflickr.com/3693/12294574244_088c606d68_o_d.png bg=#0076ba
https://assets.mozillalabs.com/Brands-Logos/Thunderbird/logo-only/thunderbird_logo-only_RGB-300dpi.jpg bg=#fff
https://assets.mozillalabs.com/Brands-Logos/Webmaker/mozilla-webmaker_logo-wordmark_RGB.jpg bg=#fff
https://assets.mozillalabs.com/Brands-Logos/Firefox%20Marketplace/logo-wordmark/firefox-marketplace_logo-wordmark_RGB-300dpi.jpg bg=#fff
http://airmozilla-ops1.corpdmz.scl3.mozilla.com/calendar/slide.html
https://assets.mozillalabs.com/Brands-Logos/Firefox/logo-only/firefox_logo-only_RGB-300dpi.jpg bg=#fff
https://farm4.staticflickr.com/3737/9270206141_849b0e4278_o_d.png