mkdir -p ~/tmp/bedrock-dev
cd ~/tmp/bedrock-dev
wget https://raw.githubusercontent.com/mozilla/bedrock/master/Procfile
DEIS_PROFILE=usw deis config:pull -a bedrock-dev
export DEIS_PROFILE=oregon-b
deis2 create bedrock-dev
deis2 config:push -a bedrock-dev
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dtruss -e -f -n emacs 2> emacs.dtruss | |
PID/THRD ELAPSD SYSCALL(args) = return | |
40753/0x21fab: 4 thread_selfid(0x7FBC99703090, 0x7FBC99409E60, 0x7FBC9940B0B0) = 139179 0 | |
40753/0x21fab: 2 csops(0x0, 0x0, 0x7FFF5FBFEA80) = 0 0 | |
40753/0x21fab: 2 issetugid(0x0, 0x0, 0x7FFF5FBFEA80) = 0 0 | |
40753/0x21fab: 3 shared_region_check_np(0x7FFF5FBFC978, 0x0, 0x7FFF5FBFEA80) = 0 0 | |
40753/0x21fab: 12 stat64("/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon\0", 0x7FFF5FBFDB78, 0x7FFF5FBFEA80) = 0 0 | |
40753/0x21fab: 7 stat64("/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit\0", 0x7FFF5FBFDB78, 0x7FFF5FBFEA80) = 0 0 | |
40753/0x21fab: 7 stat64("/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz\0", 0x7FFF5FBFDB78, 0x7FFF5FBFEA80) = 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stack trace | |
javax.servlet.ServletException: net.sf.json.JSONException: JSONObject["tag"] not found. | |
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796) | |
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) | |
at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411) | |
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) | |
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) | |
at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411) | |
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
import re | |
from gevent import monkey, spawn | |
from gevent.pool import Pool | |
monkey.patch_all() | |
from redis import Redis | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from funfactory.middleware import LocaleURLMiddleware | |
from django.conf import settings | |
class ExceptionalLocaleURLMiddleware(LocalURLMiddleware): | |
""" | |
Replacement for funfactory.middleware.LocaleURLMiddleware that supports excluding | |
specific paths from getting redirected if a lang param is present in the request. | |
""" | |
def process_request(self, request): | |
if 'lang' in request.GET and request.path in getattr( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from django.db.models import Q | |
from rna.models import Release, Note | |
def dump_release_notes_map(filename='release-notes-map.json'): | |
"used on the legacy side with the legacy models" | |
with open(filename, 'w') as f: | |
json.dump( | |
[(release.id, list( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM quay.io/mozmar/base | |
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 | |
RUN apt-get update && apt-get install -y postgresql-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export UPDATE_DOCKER_IMAGES=true | |
export DOCKERFILE=bedrock_base | |
export DOCKER_REPOSITORY=mozorg/bedrock_base | |
./docker/jenkins/build_image.sh | |
export UPDATE_DOCKER_IMAGES=false | |
export DOCKERFILE=bedrock_code | |
export DOCKER_REPOSITORY=mozorg/bedrock_code | |
export FROM_DOCKER_REPOSITORY=mozorg/bedrock_base | |
./docker/jenkins/build_image.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1C1iZRBZSDYuKENdR46or7DAcFzusyqCQ2 https://explorer.blockstack.org/address/1C1iZRBZSDYuKENdR46or7DAcFzusyqCQ2 |
- Replication lag script adopted from https://www.percona.com/blog/2012/08/29/heres-a-quick-way-to-foresee-if-replication-slave-is-ever-going-to-catch-up-and-when/
- minor tweak required: use
mawk
instead ofawk
- Encrypted mysql credentials configured with https://dev.mysql.com/doc/refman/5.7/en/mysql-config-editor.html
- minor tweak required: use
delay=60
cmd="mysql -e 'show slave status\G' | grep Seconds_Behind_Master | awk '{print \$2}'"
while sleep $delay; do eval $cmd; done | mawk -W interactive -v delay=$delay '
{
passed += delay;