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
{ | |
"name": "package-name", | |
"version": "1.0.0", | |
"description": "...", | |
"main": "filename.php", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
copy: { | |
dist: { | |
src: 'readme.txt', | |
dest: 'README.md' | |
} | |
}, |
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
#!/bin/bash | |
# | |
# Description: | |
# Mirrors a WordPress Installation to another host, accessible through a mirror subdomain | |
# | |
# | |
# Assumptions: | |
# mysql and ssh usernames are the same | |
# databases are on the same server and accessible |
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
scp -v -r 20141102_v2_file.tar.gz usuario@176.66.251.188:/home/usuario |
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
#!/bin/bash | |
WP_DBUSER=root | |
WP_DBPASS=password | |
BCK_FILE_DB=/path/to/backups/ | |
DBS=`mysql -u$WP_DBUSER -h localhost -p$WP_DBPASS -Bse 'show databases'` | |
for db in $DBS | |
do | |
echo 'database:' $db | |
mysqldump --add-drop-table -h localhost -u $WP_DBUSER -p $db --password=$WP_DBPASS | gzip > $BCK_FILE_DB$db.tar.gz |
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
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; | |
CREATE DATABASE demo; | |
GRANT ALL PRIVILEGES ON *.* TO 'wpuser'@'localhost'; | |
FLUSH PRIVILEGES; |
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
/* Column Classes | |
------------------------------------------------------------ */ | |
.five-sixths, | |
.four-fifths, | |
.four-sixths, | |
.one-fifth, | |
.one-fourth, | |
.one-half, | |
.one-sixth, |
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 | |
// Query Arguments | |
$args = array( | |
'post_type' => 'review', | |
'posts_per_page' => 10, | |
'paged' => get_query_var( 'paged', false ), | |
'meta_query' => array( | |
'relation' => 'AND', | |
'be_top_pick' => array( | |
'key' => 'be_top_pick', |
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
class PageTemplater { | |
/** | |
* A Unique Identifier | |
*/ | |
protected $plugin_slug; | |
/** | |
* A reference to an instance of this class. | |
*/ |
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
<snippet> | |
<content><![CDATA[ | |
add_action( 'init', 'register_cpt_${1:test}' ); | |
function register_cpt_${1:test}() { | |
\$labels = array( | |
'name' => _x( '${2:Tests}', '${1:test}' ), | |
'singular_name' => _x( '${3:Test}', '${1:test}' ), |
OlderNewer