Install PHP an Composer
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
- brew install composer
You can replace 56 with your preferred version, i.e. php71
<?php | |
//JSON.php -> http://pear.php.net/package/Services_JSON/ | |
require_once 'JSON.php'; | |
if ( !function_exists('json_decode') ){ | |
function json_decode($content, $assoc=false){ | |
if ( $assoc ){ | |
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); |
const axios = require("axios"); | |
const key = "AIzaSyB9e-dHIvdxxrbmorjYHWipwBKq7LJBhNk" | |
function getComments(pageToken, allItems = {}) { | |
const params = { | |
key, | |
videoId: "a4haLJdDRmc", | |
part: "snippet", | |
maxResults: 100, | |
pageToken, |
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_geoforce { | |
server 127.0.0.1:3000; | |
} | |
upstream app_pcodes{ | |
server 127.0.0.1:3001; | |
} |
Install PHP an Composer
You can replace 56 with your preferred version, i.e. php71
In your command-line run the following commands:
brew doctor
brew update
// browser detect | |
var BrowserDetect = { | |
init: function() { | |
this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; | |
this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
}, | |
searchString: function(data) { | |
for (var i = 0; i < data.length; i++) { | |
var dataString = data[i].string; |
function almostIncreasingSequence(sequence) { | |
var found = 0; | |
for (var i=0;i<sequence.length;i++) { | |
if(sequence[i] <= sequence[i-1]) { | |
found++; | |
// check if more than one nonincreasing found | |
if(found > 1) return false; | |
// check if second previous number is equal to / bigger than current number |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password