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
<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}' ), |
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 | |
echo $* | |
CURRENT_DATE=`date '+%Y%m%d-%Hh%M'` | |
WP_DATABASE=database_name | |
WP_FOLDER=wpfolder | |
WP_THEME=themefoldername | |
WP_CONTENT_PATH=/var/www/"$WP_FOLDER"/ | |
WP_THEME_PATH=/var/www/"$WP_FOLDER"/wp-content/themes/ | |
#Backup database |
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 | |
/** | |
* PXHelper by Javier Otero | |
* | |
* GNU General Public License, version 2 | |
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
* | |
*/ | |
// --------------------------------------------------- |
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
#!/usr/bin/python | |
import time | |
import os | |
username="db_username" | |
password="db_pass" | |
hostname="db_host" | |
filestamp=time.strftime('%Y%m%d-%H%M') | |
rootfolder="/var/www/www.pixellarylabs.com/public_html/clients/" |
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
{ | |
"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 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
copy: { | |
dist: { | |
src: 'readme.txt', | |
dest: 'README.md' | |
} | |
}, |
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 | |
# | |
# 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 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/sh | |
# | |
# Instant Wordpress! | |
# ------------------ | |
# Script for installing the latest version of WordPress plus a number of useful plugins. | |
# Source : https://github.com/snaptortoise/wordpress-quick-install | |
# | |
# | |
# Latest version of WP |
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
scp -v -r 20141102_v2_file.tar.gz [email protected]:/home/usuario |
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 | |
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 |
OlderNewer