#Installing ngrok on OSX
- Download ngrok
- Unzip it to your Applications directory
- Create a symlink (instructions below)
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory| // Set interval at about 2000 ms for this script | |
| // ALERTS: Alerts you when the price crosses the alert price | |
| // SPIKES: Alerts you when the price spikes x percentage in either direction | |
| // 0.1 means a distance of 0.1 % from either the high or the low of the current candle and timeframe | |
| // Settings | |
| var ALERTS = [6500, 6700] | |
| var SPIKES = [0.2, 0.4, 0.6] | |
| // Milliseconds to wait for the script to reset after you have turned it off. Lower values make it reset more often |
| /** | |
| * Sum two times values HH:mm:ss with javascript | |
| * Usage: | |
| * > addTimes('04:20:10', '21:15:10'); | |
| * > "25:35:20" | |
| * | |
| * @param {string} start | |
| * @param {string} end | |
| * @returns {String} | |
| */ |
| .modal { | |
| width: 800px; | |
| left: 40%; | |
| } | |
| .lightbox-content { | |
| width: 100%; | |
| } | |
| .lightbox-image { |
| var express = require('express'), | |
| app = express(); | |
| app.listen(80); | |
| app.get('/', function(req, res){ | |
| var ua = req.header('user-agent'); | |
| // Check the user-agent string to identyfy the device. | |
| if(/mobile|iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile|ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(ua)) { | |
| res.sendfile(__dirname + '/mobile.html'); | |
| } else { | |
| res.sendfile(__dirname + '/index.html'); |
#Installing ngrok on OSX
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory| var duo = require('duo'); // https://github.com/duojs/duo | |
| var map = require('map-stream'); // https://github.com/dominictarr/map-stream | |
| var paths = { | |
| build: { | |
| src: { | |
| jsApp: ['./src/js/main.js'], | |
| jsClient: ['./src/js/client.js'] | |
| }, |
| /** | |
| * Module Dependencies | |
| */ | |
| var map = require('map-stream'); | |
| var Duo = require('../../'); | |
| var gulp = require('gulp'); | |
| /** | |
| * Default |
| if [ ! -d "htdocs" ]; then | |
| echo 'Installing WordPress (release version) in realestate/htdocs...' | |
| mkdir ./htdocs | |
| cd ./htdocs | |
| wp core download --allow-root | |
| wp core config --dbname="realestate" --dbuser=wp --dbpass=wp --dbhost="localhost" --allow-root | |
| wp core install --url=realestate.dev --title="realestate - A WordPress Site" --admin_user=admin --admin_password=password [email protected] --allow-root | |
| cd - | |
| else | |
| echo 'Updating WordPress in realestate/htdocs...' |
| /** | |
| * Checks if a particular user has a role. | |
| * Returns true if a match was found. | |
| * | |
| * @param string $role Role name. | |
| * @param int $user_id (Optional) The ID of a user. Defaults to the current user. | |
| * @return bool | |
| */ | |
| function appthemes_check_user_role( $role, $user_id = null ) { | |
| // scroll to div | |
| $(function($){ | |
| $('a.nav').click(function() { | |
| var $this = $(this), | |
| _href = $this.attr('href'), | |
| dest = $(_href).offset().top; | |
| $("html:not(:animated),body:not(:animated)").animate({ scrollTop: dest}, 400 ); | |
| return false; | |
| }); | |
| }); |