var Type = require('type-of-is') | |
module.exports = function generateJsonSchema (object) { | |
for (var key in object) { | |
var value = object[key] | |
var type = Type.string(value).toLowerCase() | |
if (type === 'undefined') { | |
type = 'null' | |
} |
/** | |
* Created by gonchub on 19/03/14. | |
*/ | |
function keysToLowerCase(obj) { | |
if (!typeof(obj) === "object" || typeof(obj) === "string" || typeof(obj) === "number" || typeof(obj) === "boolean") { | |
return obj; | |
} | |
var keys = Object.keys(obj); | |
var n = keys.length; | |
var lowKey; |
#https://gorails.com/setup/ubuntu/14.04 | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default |
var tmp = null; | |
$('###selector###').popover({ | |
trigger: 'manual', | |
title: 'testing', | |
delay: {show:500, hide:100} | |
}); | |
$('###selector###').hover(function(){ | |
clearTimeout(tmp); |
#Download the following ZIPs: ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
#Download the correct GApps for your Android version: Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
// ==UserScript== | |
// @name Steam Link Filter Bypass | |
// @author Zeke Sonxx | |
// @namespace zekesonxx | |
// @version 0.2 | |
// @description Bypasses the Steam link filter | |
// @match https://steamcommunity.com/linkfilter/* | |
// @include https://steamcommunity.com/linkfilter/* | |
// @copyright 2014, Zeke Sonxx, MIT Licensed | |
// ==/UserScript== |
Short url: caseywatts.com/mediawikionheroku
Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book
How to get set up with Mediawiki running on Heroku.
Fork https://github.com/mediawiki/mediawiki (from the web interface)
(master
worked fine for me, but you might want the last stable tag?)
'''Provides utility functions for encoding and decoding linestrings using the | |
Google encoded polyline algorithm. | |
''' | |
def encode_coords(coords): | |
'''Encodes a polyline using Google's polyline algorithm | |
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html | |
for more information. | |
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |