The first thing to do is to install Git on the remote server.
Once you do that the rest of the process is split into three sections:
- Server set-up
- Local set-up (push commits)
- Server (pull commits)
<?php | |
define('DB_NAME', 'LOCAL_DB_NAME'); | |
/** MySQL database username */ | |
define('DB_USER', 'LOCAL_DB_USERNAME'); | |
/** MySQL database password */ | |
define('DB_PASSWORD', 'LOCAL_DB_PASSWORD'); | |
/** MySQL hostname */ |
angular.module('d3', []) | |
.provider('d3Service', function() { | |
function createScript($document, callback, success) { | |
var scriptTag = $document.createElement('script'); | |
scriptTag.type = "text/javascript"; | |
scriptTag.async = true; | |
scriptTag.src = 'http://d3js.org/d3.v3.min.js'; | |
scriptTag.onreadystatechange = function() { | |
if (this.readyState == 'complete') { | |
callback(); |
angular.module('myApp') | |
.controller('SampleCtrl', ['$scope', 'sampleService', function($scope, sampleService) { | |
$scope.loaded = true; | |
$scope.loadedContent = null; | |
$scope.sampleAction = function() { // Sample Action that will call the API server | |
$scope.loaded = false; | |
$scope.loadedContent = sampleService.get({}, function(data) { | |
$scope.loaded = true; | |
}, function(err) { |
This gist assumes:
<?php | |
add_action( 'after_setup_theme', 'bootstrap_setup' ); | |
if ( ! function_exists( 'bootstrap_setup' ) ): | |
function bootstrap_setup(){ | |
add_action( 'init', 'register_menu' ); | |
config(['$provide', function($provide) { | |
$provide.decorator('$sniffer', ['$delegate', function($sniffer) { | |
var msie = parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent)) || [])[1], 10); | |
var _hasEvent = $sniffer.hasEvent; | |
$sniffer.hasEvent = function(event) { | |
if (event === 'input' && msie === 10) { | |
return false; | |
} | |
_hasEvent.call(this, event); | |
} |
var fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |
/* | |
Theme Name: wpbase | |
Theme URI: https://github.com/sunnycyk/wpbase | |
Description: A Basic WordPress Theme | |
Version: 0.1 | |
Author: Sunny Cheung | |
Author URI: http://sunnycyk.hk | |
Tags: | |
License: GNU General Public License v2.0 & Apache License 2.0 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html http://www.apache.org/licenses/LICENSE-2.0 |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |