Skip to content

Instantly share code, notes, and snippets.

View bensternthal's full-sized avatar
😻

Benjamin Sternthal bensternthal

😻
View GitHub Profile
If you see content with 2 text boxes, these are for handling the singular (Box 0) and plural (Box 1) forms of words.
1.
%(more_count)s more
Box 0 should be the singular form, box 1 would be the plural.
Example:
Box 0 %(count)s message
@bensternthal
bensternthal / gist:c153649b6f943c8e5e31
Created August 7, 2014 15:17
Corrected CMS Contet
Wrong/Current
============================================================
<div class="mceTmpl">
<h3 class="mini-title">Detailed Features</h3>
<p class="offset-block">
Get more information about each Firefox OS release.
<br />
<a class="follow" href="/media/uploads/Learn/Guides/productfeatureoverview1.3_final(1).pdf">Download Version 1.3 Features</a>
@bensternthal
bensternthal / index.html
Last active August 29, 2015 14:02
D3 Experiment #1
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
THE FOLLOWING PACKAGES DIDN'T MATCHES THE HASHES SPECIFIED IN THE REQUIREMENTS
FILE. If you have updated the package versions, update the hashes. If not,
freak out, because someone has tampered with the packages.
django-appconf: expected 53T3tTehlADKaH9I01KrdGFzKsQThd2I_a1Hie-tKcU
got qI7Y-5I6U8cMLEb75FCLX4Fka0sBQB8VaKghZxszIVw
six: expected jzT1uJ4X-opuOUUxAxjL1cjLsW-iiPeOqW28cDRMsb8
got 1DkqfI2RsAXAAlaKhfr2F8ZyQcjNg5nMOV6PEAWv-A0
Django: expected uBCR_UHpUunXFQuLwgVbFAwsETJIX3jk6gdQE3CAANU
got 0bP4Rg6Tb0eEbnxPgK-VHtqCpBwlPDpR_zOJhj_xwDo
@bensternthal
bensternthal / gist:9238814
Created February 26, 2014 21:20
Git Config For Pretty Log "git lg"
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
@bensternthal
bensternthal / js-bug-id-regex
Created February 21, 2014 18:15
I want to get the list of bugs mentioned in a commit message! Essentially the same regex used here but in Javasctipt: https://github.com/github/github-services/blob/master/lib/services/bugzilla.rb#L139
//I hate regex. Here is what I have so far.
var testString = "fix bug 3524";
var regex1 = new RegExp("/(?:close|fix|address)*?(?=(?:ticket|bug|tracker item|issue)*?)/","i");
var result = regex1.exec(testString);
if (result) {
console.log(result);
} else {
console.log('no match!');
How has working with your manager been this last quarter?
What are the things your manager does really well?
What are the things your manager could improve?
Within Web Productions, what could your manager do to make you or our team more effective.
In the larger Mozilla universe, what would you like to see your manager work to improve?
@bensternthal
bensternthal / gist:7548331
Created November 19, 2013 16:39
Apache Static Files
from django.conf import settings
from django.conf.urls.defaults import include, patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns <- this!!
from django.http import HttpResponse
from django.shortcuts import render
***
{# L10n: Text is used in a tweet, please keep the length under 110 characters. #}
<a href="{{ twitterShare('http://mzl.la/158wtFo', _('Vote for the #FirefoxFlicks People\'s Choice Award! ') , via='firefoxflicks') }}" rel="external" data-window-opts="toolbar=0, status=0, resizable=1, width=626, height=436">
{{ _('Share on Twitter') }}
</a>