Use DigitalOceans Ubuntu Node image.
sudo apt-get update
sudo apt-get install nginx
| <img src="/assets/img/logo.svg" onerror="this.onerror=null; this.src='/assets/img/logo.jpg'" alt="My Logo"> |
| // On windows, /speaker/deps/mpg123/src/output/win32.c must be replaced with a newer version | |
| console.log('start'); | |
| var request = require('request'); | |
| console.log('request'); | |
| var lame = require('lame'); | |
| console.log('lame'); | |
| var Speaker = require('speaker'); | |
| console.log('Speaker'); | |
| var streamUrl = "https://api.soundcloud.com/tracks/91077814/stream?client_id=7868b491b9102e023ee4f3a8d3e6795c"; |
| var gulp = require('gulp'), | |
| sourcemaps = require('gulp-sourcemaps'), | |
| uglify = require("gulp-uglify"), | |
| jshint = require("gulp-jshint"), | |
| rename = require("gulp-rename"), | |
| less = require("gulp-less"), | |
| LessPluginCleanCSS = require('less-plugin-clean-css'), | |
| cleancss = new LessPluginCleanCSS({ advanced: true }), | |
| LessPluginAutoPrefix = require('less-plugin-autoprefix'), | |
| autoprefixer = new LessPluginAutoPrefix({ browsers: ["last 2 versions"] }); |
| From the first few pages of the manual to | |
| Lost Treasures of Infocom I (also Frotz): | |
| ============================================ | |
| || Communicating with Interactive Fiction || | |
| ============================================ | |
| With Interactive Fiction, you type your commands in plain English each | |
| time you see the prompt which looks like this: |
| 'atom-text-editor': | |
| 'ctrl-g': 'find-and-replace:select-next' | |
| 'atom-workspace atom-text-editor:not([mini])': | |
| 'cmd-d': 'editor:duplicate-lines' | |
| 'alt-shift-up': 'editor:move-line-up' | |
| 'alt-shift-down': 'editor:move-line-down' |
| new Swipe(document.getElementById("gallery"), function(event, direction) { | |
| event.preventDefault(); | |
| switch (direction) { | |
| case "up": | |
| // Handle Swipe Up | |
| break; | |
| case "down": | |
| // Handle Swipe Down | |
| break; |
| function get(url, success, error) { | |
| var request = new XMLHttpRequest(); | |
| request.open('GET', window.baseUrl + url, true); | |
| request.setRequestHeader("X-Requested-With", "XMLHttpRequest"); | |
| request.onload = function() { | |
| var data = request.responseText; | |
| if (request.status >= 200 && request.status < 400) { | |
| success(data); | |
| } else { |
With the device connected and in development mode (Google it), port-forward :8081 on your Android device.
Then run react-native run-andoid. Done.
Open AppDelegate.m in Xcode.
Replace:
| <?php | |
| // When using: | |
| // `ngrok http -host-header=example.dev 80` | |
| $isNgrok = array_key_exists("HTTP_X_ORIGINAL_HOST", $_SERVER) && strpos($_SERVER["HTTP_X_ORIGINAL_HOST"], "ngrok"); | |
| $host = 'http://' . $_SERVER[$isNgrok ? 'HTTP_X_ORIGINAL_HOST' : 'SERVER_NAME'] . '/'; | |
| return array( |