$ zmv -n '(.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y. $ zmv -n '(.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'
$ zmv '*' '${(L)f}'
$ autoload zmv
$ zmv -n '(.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y. $ zmv -n '(.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'
$ zmv '*' '${(L)f}'
$ autoload zmv
Picking the right architecture = Picking the right battles + Managing trade-offs
Answer by Jim Dennis on Stack Overflow question: what is your most productive shortcut?
You mention cutting with yy
and complain that you almost never want to cut
whole lines. In fact programmers, editing source code, very often want to work
on whole lines, ranges of lines and blocks of code. However, yy
is only one
of many way to yank text into the anonymous copy buffer (or "register" as it's
called in vi).
<?php | |
// A helper function to validate Facebook Auth-Token. | |
// This checks if the Facebook auth-token is valid, and belongs to the said facebook-id | |
function is_facebook_auth_valid($facebook_token, $facebook_id) | |
{ | |
$ch = curl_init(); | |
$url="https://graph.facebook.com/me?access_token=".$facebook_token; | |
curl_setopt($ch, CURLOPT_URL,$url ); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |