Skip to content

Instantly share code, notes, and snippets.

@piatra
piatra / .gitconfig
Last active May 13, 2019 08:45
DOT files
[cinnabar]
helper = /Users/andreioprea/Work/git-cinnabar/git-cinnabar-helper
[user]
name = Andrei Oprea
email = andrei.br92@gmail.com
[alias]
co = checkout
ci = commit
st = status
br = branch
@piatra
piatra / Dockerfile
Created July 17, 2018 15:45
docker recipe for firefox artifact build
FROM ubuntu:16.04
# Basic boostrap
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
git \
python \
build-essential \
wget \
curl \
@piatra
piatra / run_mochitests.sh
Last active July 17, 2018 09:26
run_mochitests.sh
#!/bin/bash
export SHELL=/bin/bash
cd /firefox/src
git clone https://github.com/mozilla/activity-stream.git
cd activity-stream
npm install
npm buildmc
npm run mochitest
@piatra
piatra / mozconfig
Last active July 16, 2018 18:44
mozconfig
#Automatically download and use compiled C++ components:
ac_add_options --enable-artifact-builds
# Write build artifacts to:
mk_add_options MOZ_OBJDIR=./objdir-frontend
mk_add_options AUTOCLOBBER=1
diff --git a/browser/components/preferences/in-content/home.js b/browser/components/preferences/in-content/home.js
index e6e02c24c9e1..20cbf7db56e7 100644
--- a/browser/components/preferences/in-content/home.js
+++ b/browser/components/preferences/in-content/home.js
@@ -31,13 +31,45 @@ Preferences.addAll([
const HOMEPAGE_OVERRIDE_KEY = "homepage_override";
const URL_OVERRIDES_TYPE = "url_overrides";
const NEW_TAB_KEY = "newTabURL";
+const ACTIVITY_STREAM_PREF_BRANCH = "browser.newtabpage.activity-stream.";
+const NEWTAB_ENABLED_PREF = "browser.newtabpage.enabled";
@piatra
piatra / messages.json
Last active October 11, 2018 12:37
test
{
"messages": [
{
"content": {
"button_label": "Sign Up",
"dismiss_button_label": "Dismiss",
"scene2_button_label": "Sign Up Now",
"scene2_email_placeholder_text": "Your email here",
"form_action": "https://basket.mozilla.org/subscribe.json",
"success_text": "Check your inbox for the confirmation!",
@piatra
piatra / settings.py.patch
Last active April 9, 2018 20:09
run mozmeao/snippets-service locally
diff --git a/snippets/settings.py b/snippets/settings.py
index 91e4e5a..f1e8dd6 100644
--- a/snippets/settings.py
+++ b/snippets/settings.py
@@ -199,12 +199,14 @@ TEMPLATES = [
CSP_DEFAULT_SRC = (
"'self'",
+ "'unsafe-inline'",
)
mutate i' g =
let i = getDummy i'
(g', newI) = foldl mutateEach (g, []) i
in (Dummy newI, g')
where mutateEach (gen, acc) el =
let (n, gen') = randomR (1, 100) gen
in (gen', el + n : acc)
/home/worker/bin/run-task --chown /home/worker/workspace -- /home/worker/bin/test-linux.sh --no-read-buildbot-config --installer-url=https://queue.taskcluster.net/v1/task/d_RCYNZ_QZGzny7JHoq8QQ/artifacts/public/build/target.tar.bz2 --test-packages-url=https://queue.taskcluster.net/v1/task/d_RCYNZ_QZGzny7JHoq8QQ/artifacts/public/build/target.test_packages.json --mochitest-suite=browser-chrome-chunked --total-chunk=7 --this-chunk=3 --download-symbols=ondemand
this.Dedupe = class Dedupe {
constructor(createKey, compare) {
this.createKey = createKey || this.defaultCreateKey;
this.compare = compare || this.defaultCompare;
}
defaultCreateKey(item) {
return item;
}