# Export current (local) DB
wp db export db.sql
# Copy file from local to server (may need to amend server path if not in html folder)
# The example below is for local to remote, simply swap these 2 around for remote to local
scp -r db.sql www-data@IP_ADDRESS:/var/www/html
# SSH onto box (should be same connection details as above)
This file contains hidden or 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 | |
/** | |
* The admin-specific functionality of the plugin. | |
* | |
* @link http://casino.tables.plugin | |
* @since 1.0.0 | |
* | |
* @package Casino_Tables_Plugin | |
* @subpackage Casino_Tables_Plugin/admin |
This file contains hidden or 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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
This file contains hidden or 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
(function($){ | |
if (typeof(data) === 'undefined') { | |
return false; | |
} | |
if ( 'chart_most_popular' == data.data_type ) { | |
var post_titles = [], | |
post_comment_count = []; |
This file contains hidden or 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 | |
/* SLIDER CUSTOM FIELD FOR HOMEPAGE */ | |
$images = get_field('slider_photos'); | |
$count=0; | |
$count1=0; | |
if($images) : ?> | |
<div id="slider"> | |
<div id="carousel" class="carousel slide"> | |
<!-- Indicators --> |
This file contains hidden or 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'), | |
gutil = require('gulp-util'), | |
coffee = require('gulp-coffee'), | |
browserify = require('gulp-browserify'), | |
compass = require('gulp-compass'), | |
connect = require('gulp-connect'), | |
gulpif = require('gulp-if'), | |
uglify = require('gulp-uglify'), | |
minifyHTML = require('gulp-minify-html'), | |
jsonminify = require('gulp-jsonminify'), |
This file contains hidden or 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
add_filter('gform_pre_render', 'swp_populate_attendee_list'); | |
function swp_populate_attendee_list($form){ | |
$num = swp_get_the_amount(); | |
if ( count( $num ) < 1 ) { | |
add_filter('gform_get_form_filter', create_function('', "return 'You have not met the condition! Please go to <a href=\"/?page_id=1\">this form.</a>';") ); | |
} | |
return $form; |
This file contains hidden or 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 | |
if( stristr( $_SERVER['SERVER_NAME'], "dev" ) ) { | |
// Dev Environment | |
define( 'DB_NAME', 'project_dev' ); | |
define( 'DB_USER', 'project_dev_user' ); | |
define( 'DB_PASSWORD', 'password' ); | |
define( 'DB_HOST', 'localhost' ); | |
This file contains hidden or 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
#!/bin/bash | |
#Download the latest copy of WordPress into a directory, grab all the files in the new /wordpress folder | |
#Put all the files in the current directory, remove the now empty /wordpress directory | |
#Remove the tarball | |
#download latest wordpress with wget | |
wget http://wordpress.org/latest.tar.gz | |
#OR using CURL |
This file contains hidden or 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
background: -moz-linear-gradient(left, rgba(237,237,237,1) 36%, rgba(237,237,237,0.98) 37%, rgba(237,237,237,0) 100%); /* FF3.6-15 */ | |
background: -webkit-linear-gradient(left, rgba(237,237,237,1) 36%,rgba(237,237,237,0.98) 37%,rgba(237,237,237,0) 100%); /* Chrome10-25,Safari5.1-6 */ | |
background: linear-gradient(to right, rgba(237,237,237,1) 36%,rgba(237,237,237,0.98) 37%,rgba(237,237,237,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#00ededed',GradientType=1 ); /* IE6-9 */ |
NewerOlder