start new:
tmux
start new with session name:
tmux new -s myname
//USE CASE | |
$('#q').selectRange(0, 10); | |
$('#q').selectRange(searchVal.indexOf('{'), (searchVal.indexOf('}')+1)); | |
//Source here : http://plugins.jquery.com/project/selectRange | |
$.fn.selectRange = function(start, end) { | |
var e = document.getElementById($(this).attr('id')); // I don't know why... but $(this) don't want to work today :-/ | |
if (!e) return; |
partial // default: loop,post_list | |
wrap // default: true (boolean) | |
wrapper_class // class attribute for the <ul> element | |
post_status // default: publish | |
posts_per_page // default: Settings > Reading > Blog pages show at most | |
paged // default: paged (if shortcode is in a custom page template use paged="page") | |
offset // number of posts to displace | |
orderby // default: date | |
order // default: DESC | |
p // post ID |
<?php | |
/* | |
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits | |
Plugin URL: http://easydigitaldownloads.com/extension/ | |
Description: Limit the number of license activations permitted based on variable prices | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
Country | CountryCode | Currency | Code | |
---|---|---|---|---|
New Zealand | NZ | New Zealand Dollars | NZD | |
Cook Islands | CK | New Zealand Dollars | NZD | |
Niue | NU | New Zealand Dollars | NZD | |
Pitcairn | PN | New Zealand Dollars | NZD | |
Tokelau | TK | New Zealand Dollars | NZD | |
Australian | AU | Australian Dollars | AUD | |
Christmas Island | CX | Australian Dollars | AUD | |
Cocos (Keeling) Islands | CC | Australian Dollars | AUD | |
Heard and Mc Donald Islands | HM | Australian Dollars | AUD |
<?php | |
/** | |
* Restricts certain menu items from appearing the WP Admin area. Does not | |
* affect Administrator users. | |
* | |
* @action admin_menu | |
*/ | |
function fjarrett_restrict_admin_menu_items() { | |
// Don't restrict Administrator users. |
THIS REPO HAS MOVED! It has graduated to a dedicated GitHub project: https://github.com/x-team/vassh
The big pain of doing vagrant ssh
is that it doesn’t drop you into the corresponding working directory in the Vagrant guest’s synced_folder, so you have to cd
to the dir and then run whatever you needed to do (e.g. wp core update
). This is the problem that vassh
solves: it will make sure you start out in the corresponding directory. So if you’re in your WordPress project on your host machine, all you need to do is:
$ vassh wp core update
There’s also a wrapper called vasshin
which will shell you into Vagrant at the current directory, with a prompt for entering commands. This gets you colors and interactive TTY. You can also pass commands as arguments to vasshin
to have them executed right away in the colorized TTY (with some additional Vagrant .bash_login
echoes and SSH connection close):
PS1='\[\033[31m\]$(retval=$?;if [[ $retval != 0 ]]; then echo "^E$retval "; fi)\[\033[00m\]\[\033[32m\]\u@\h\[\033[00m\][$(date "+%H:%M:%S")]:\[\033[35m\]\w\[\033[31m\]$(__git_ps1 " (%s)")$(__svn_ps1 " (%s)")\[\033[00m\]\n\!\$ ' |
{ | |
"status": "success", | |
"code": 0, | |
"message": "ok", | |
"data": { | |
"last_name": "Alba", | |
"domain_verified": false, | |
"following_count": 71, | |
"image_medium_url": "http://media-cache-ec0.pinimg.com/avatars/jessicamalba_1360689715_75.jpg", | |
"implicitly_followed_by_me": false, |
var waitForEl = function(selector, callback) { | |
if (jQuery(selector).length) { | |
callback(); | |
} else { | |
setTimeout(function() { | |
waitForEl(selector, callback); | |
}, 100); | |
} | |
}; |