SimplePush - Examples source: https://gist.github.com/matzew/cbda360d72eaaef75971
- establish WSS connection
#!/bin/bash | |
if [ $1 ] | |
then | |
RELEASE=$1 | |
else | |
RELEASE=`date +%Y%m%d` | |
fi | |
BRANCH="$HOME/git/B2G/gaia-rpappalax" | |
BRANCH_NEW="$HOME/git/B2G/gaia-$RELEASE" |
var http = require('http'); | |
var chunk = ''; | |
var chunks = ''; | |
var LEN_NO_MAIL = 10; | |
var isConfirmedEmail = function () { | |
var isConfirmed; | |
email = '[email protected]'; | |
// getting socket hang up error |
var http = require('http'); | |
//var url = 'http://ip-api.com/json'; | |
var url = 'http://restmail.net/mail/[email protected]'; | |
var chunks; | |
function makeCall (url, callback) { | |
http.get(url,function (res) { | |
res.on('data', function (d) { |
#!/bin/bash -e | |
DEV_SERIAL="$1" | |
ADB="adb -s $DEV_SERIAL" | |
echo "DEV_SERIAL = $DEV_SERIAL" | |
# adb root, then remount and stop b2g | |
function adb_root_remount() { | |
echo -e "\n\033[1mRoot and remount\033[0m" |
import PIL | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
# font = ImageFont.truetype("Arial-Bold.ttf",14) | |
font = ImageFont.truetype("ArialUnicode.ttf",34) | |
img=Image.new("RGBA", (500,250),(255,255,255)) | |
draw = ImageDraw.Draw(img) | |
draw.text((0, 0),"This is a test",(0,0,0) ,font=font) |
http://pythonfiddle.com/algorithms-x-python-x-bubble-sort |
#!/bin/bash | |
# | |
# Copies certain kinds of known files and directories from a given Jenkins master directory | |
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em. | |
# | |
set -ex | |
if [ $# -ne 2 ]; then | |
echo usage: $0 root_dir jenkins_master |
#!/bin/bash -e | |
if (( $# != 1 )); then | |
echo "Please specify the tag" | |
exit 1; | |
fi | |
MY_PROJECT_DIR=$(basename $(pwd)) | |
TAG=$1 | |
echo "Tagging..." | |
git tag -a $1 -m "Release $1" | |
echo "Make version..." |
SimplePush - Examples source: https://gist.github.com/matzew/cbda360d72eaaef75971
#!/bin/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
# Install stuff # | |
################# | |
# Install development tools and some misc. necessary packages | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel # gen'l reqs |