Skip to content

Instantly share code, notes, and snippets.

View stasm's full-sized avatar

Stanisław Małolepszy stasm

View GitHub Profile
#! /bin/env python
import os
import sys
from subprocess import Popen
from tempfile import TemporaryFile
from translate.tools import phppo2pypo
# How can we access settings.STANDALONE_DOMAINS from here?
standalone_domains = ['firefoxcup']
#! /bin/env python
import os
import sys
from subprocess import Popen
from tempfile import TemporaryFile
from translate.tools import phppo2pypo
# How can we access settings.STANDALONE_DOMAINS from here?
standalone_domains = ['firefoxcup']
@stasm
stasm / entity.py
Created December 9, 2010 12:47
Silme's new entity object
"""
silme.core.Entity represents single key:value pair
"""
__all__ = ['is_string','is_entity','Entity']
def is_string(v):
return isinstance(v, basestring)
def is_entity(o):
@stasm
stasm / betteryammer.css
Created March 8, 2011 12:14
Some CSS tweaks that make Yammer easier to use for me (and less like FB)
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("https://www.yammer.com/mozilla.com") {
/*
* Change header background
* ========================
*
*/
@stasm
stasm / migrate-mobile.sh
Created December 20, 2011 09:34
Migrate your mobile/ directory to the new layout with mobile/android and mobile/xul
#!/bin/bash
function msg {
echo
echo "########################################"
echo -e $@
echo "########################################"
echo
}
@stasm
stasm / boot2gecko.sh
Created July 20, 2012 09:27
Convenience script for running and updating the B2G desktop builds
#!/bin/bash
HERE=$(cd `dirname $0`; pwd)
if [ $# -eq 0 ]; then
if [[ ! -d "$HERE/b2g" || ! -d "$HERE/gaia" ]]; then
echo "The b2g and/or gaia directories appear to be missing."
echo "Run '$0 update' first."
exit 1
fi
@stasm
stasm / gist:3769540
Created September 23, 2012 09:52
copyedits
git clone git://github.com/jcarpenter/gaia.git
cd gaia
git remote add upstream https://github.com/mozilla-b2g/gaia
git pull upstream master
# create the 'copyedits' branch locally
git checkout -b copyedits
#...edit the files...
@stasm
stasm / gaia-l10n-testing.markdown
Created September 27, 2012 13:03
Quick & dirty l10n testing in Gaia
@stasm
stasm / music.diff
Last active December 18, 2015 16:59
Port Gaia Music app to L20n
diff --git a/apps/music/index.html b/apps/music/index.html
index ae95940..b64d3ef 100644
--- a/apps/music/index.html
+++ b/apps/music/index.html
@@ -4,15 +4,17 @@
<meta charset="utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<title>Music</title>
+ <!-- Localization -->
+ <meta name="locales" content="en-US, pl" />
@stasm
stasm / example.json
Last active December 18, 2015 20:38
An example L20n file with its AST (in JSON and Yaml)
{
"type": "LOL",
"body": [
{
"type": "Entity",
"id": {
"type": "Identifier",
"name": "hello"
},
"value": {