Skip to content

Instantly share code, notes, and snippets.

View lonnen's full-sized avatar
:shipit:

Lonnen lonnen

:shipit:
View GitHub Profile
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
@lonnen
lonnen / deploy.sh
Last active August 29, 2015 13:57
a more-or-less updated recipe for deploying the webeng combine back end
git clone git@github.com:lonnen/webeng-2014-puzzles.git
rm -rf /puzzles; cp -r webeng-2014-puzzles /puzzles
git clone git@github.com:lonnen/davis-ci.git
cd davis-ci
git clone git@github.com:lonnen/doozer.git
cd doozer
make build
cd ..
make install
@lonnen
lonnen / addkeys.sh
Last active August 29, 2015 13:57
register a bunch of pubkeys with sshcommand. takes 1 arg, a filename where the file contains a username, followed by one or more ssh keys, each on its own line, followed by the next username, and so on
#!/usr/bin/env bash
name="";
key="";
while read line; do
if [[ $line == ssh* ]]; then
key=$line
echo $key | sshcommand acl-add dokku $name
else
@lonnen
lonnen / gist:9635489
Last active August 29, 2015 13:57
a quick, simple but not very efficient answer to: https://twitter.com/peterbe/status/446139741902086145
function pySplit(str, sep, num) {
var pieces = str.split(sep)
if (arguments.length < 3) {
return pieces;
}
if (pieces.length < num) {
return pieces;
}
return pieces.slice(0, num).concat(pieces.slice(num).join(sep));
}
git status # make sure you have no unstaged changes
git checkout master # ensure you're on the master branch
git reset HEAD~15 # removes the last 15 commits, leaves the diff as unstaged changes
git checkout . # deletes all unstaged changes so your repo looks outdated to git
git pull mozilla master # pull all the commits you're missing, bringing you up to date
MainThread - Exception raised during socorro.external.hbase.connection_context transaction
Traceback (most recent call last):
File "/data/socorro/application/socorro/database/transaction_executor.py", line 43, in __call__
result = function(connection, *args, **kwargs)
File "/data/socorro/application/socorro/external/hbase/hbase_client.py", line 555, in get_processed_json
number_of_retries=number_of_retries
File "/data/socorro/application/socorro/external/hbase/hbase_client.py", line 191, in f
result = fn(self, *args, **kwargs)
File "/data/socorro/application/socorro/external/hbase/hbase_client.py", line 547, in get_processed_json_as_string
tutorial_tests = """
Let's try a simple generator:
>>> def f():
... yield 1
... yield 2
>>> for i in f():
... print i
1
@lonnen
lonnen / 00-order-of-operations.md
Last active December 30, 2015 22:49
Socorro build investigation

Build steps identified in Jenkins log output.

Timestamps are the amount of time MM:SS until the next call to make. This may be misleading. It's unclear when make is calling a build dependency and when we're executing a new line of build.sh.

Stars indicate how many times previously the make target has already been run during this single build.

  00:02 [jenkins] Lets Commence
  00:06 [jenkins] checkout the repo
  00:00 [make] clean
 00:01 [make] bootstrap
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Jenkins build script for building Breakpad
# any failures in this script should cause the build to fail
set -e
@lonnen
lonnen / 00
Last active December 30, 2015 12:39
draft socorro makefile target changes
what we've got now:
all
test
test-socorro
test-webapp
bootstrap
install
reinstall
install-socorro
lint