PhpStorm now bundles WordPress coding style natively, starting from version 8.
- Go to
Project Settings>Code Style>PHP. - Select
Set From...(top right of window) >Predefined Style>WordPress.
No longer need to muck with this import! :)
| <?php | |
| /* | |
| Plugin Name: Color Rotator | |
| Description: Change the color scheme every time you login | |
| Author: Aaron Jorbin | |
| Version: 1.0 | |
| Author URI: http://aaron.jorb.in/ | |
| License: GPLv2 or later | |
| */ |
| <?php | |
| /* | |
| * Plugin Name: Commercial Client | |
| * Plugin URI: http://pento.net/ | |
| * Description: A sample client plugin for showing updates for non-WordPress.org plugins | |
| * Author: pento | |
| * Version: 0.1 | |
| * Author URI: http://pento.net/ | |
| * License: GPL2+ | |
| */ |
| import os | |
| import sys | |
| import pickle | |
| import console | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
| sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
| import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
| STATE_FILE = '.dropbox_state' |
| # YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW! | |
| # Go to dropbox.com/developers/apps to create an app. | |
| app_key = 'YOUR_APP_KEY' | |
| app_secret = 'YOUR_APP_SECRET' | |
| # access_type can be 'app_folder' or 'dropbox', depending on | |
| # how you registered your app. | |
| access_type = 'app_folder' |
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
| <?php | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |
| # Makefile for php project setup | |
| # | |
| # You can set these variables from the command line. | |
| AUTHOR = Author | |
| PROJECT = Project | |
| BUILDFILE = project.phar | |
| SRCDIR = src | |
| TESTDIR = tests | |
| PHPUNITCONFIG = phpunit.xml.dist |
| #!/usr/bin/env bash | |
| # args | |
| MSG=${1-'deploy from git'} | |
| BRANCH=${2-'trunk'} | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| DEST_DIR=~/svn/$DIR_NAME/$BRANCH |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |