git checkout gh-pages
git checkout master -- myplugin.js
git commit -m "Update myplugin.js from master"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php artisan tinker | |
$tables = DB::select('SHOW TABLES'); | |
$tables_in_database = "Tables_in_".Config::get('database.connections.mysql.database'); | |
DB::statement('SET FOREIGN_KEY_CHECKS=0;'); | |
foreach ($tables as $table) { | |
Schema::drop($table->$tables_in_database); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var copy = require('gulp-copy'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var connect = require('gulp-connect'); | |
var browserify = require('browserify'); | |
var partialify = require('partialify'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WP_Rewrite endpoints demo | |
Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
Author: Jon Cave | |
Author URI: http://joncave.co.uk/ | |
*/ | |
function makeplugins_endpoints_add_endpoint() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM `site_posts` | |
WHERE `category_slug` REGEXP 's:[0-9]+:"uncategoriz".*' | |
LIMIT 0 , 30 |
- create a new redis .conf file
$ cp /etc/redis/redis.conf /etc/redis/redis-server1.conf
- edit /etc/redis/redis-server1.conf, illustrated as below
...
sudo chmod -R gu+w storage
sudo chmod -R guo+w storage
php artisan cache:clear
sudo nohup supervisor socket.js &
- GET /tickets - Retrieves a list of tickets
- GET /tickets/12 - Retrieves a specific ticket
- POST /tickets - Creates a new ticket
- PUT /tickets/12 - Updates ticket #12
- PATCH /tickets/12 - Partially updates ticket #12
- DELETE /tickets/12 - Deletes ticket #12
Reference http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api