Skip to content

Instantly share code, notes, and snippets.

➜ /tmp goingnative verify
✓ Found usable `gcc` in $PATH: v5.1.0
✓ Found usable `python` in $PATH: v2.7.5
✗ `node-gyp` not found in $PATH
# FAIL
Your solution to AM I READY? didn't pass. Try again!
➜ /tmp npm install -g node-gyp
function makePass(pass, done) {
crypto.randomBytes(10, function(err, bytes) {
if(err) return done(err);
var s = bytes.toString('hex');
done(makeHash(pass, s));
});
}
function makeHash(pass, salt) {
return salt + "$" + require('crypto').createHmac('sha256', salt).update(pass).digest('hex');
function getImageDataURL(img) {
var data, canvas, ctx;
canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0);
return canvas.toDataURL();
}
➜ MacOS ./firefox
console.debug: adbhelper@mozilla.org
ADB:
Asking for host:version
console.debug: adbhelper@mozilla.org
ADB:
running checker onerror
console.debug: adbhelper@mozilla.org
ADB:
running checker onclose
DevicePolicyManager mDPM;
ComponentName mDeviceAdminSample;
int pwHistoryLength = 5;
mDPM.setPasswordHistoryLength(mDeviceAdminSample, pwHistoryLength);
> "v/sAurGIs0lo4?".match(/v\/(.+)\?/)[1]
'sAurGIs0lo4'
$(document).ready(function() {
var directions = {
'east': {
value: 1,
class: 'fromWest'
},
'southeast': {
value: 4,
class: 'fromNorthwest'
//Takes a url to JSON data and returns an object
function req(url, cb) {
var r = new XMLHttpRequest();
r.open('GET', url, true);
r.onload = function() {
if(this.status != 200) return cb(new Error("Expected 200 got " + this.status));
try {
var data = JSON.parse(this.response)
} catch(e) {
<<<<<<< HEAD
=======
>>>>>>> logging