Git
remove merged branches
- git branch --merged dev | grep -v -E "(master|dev)" | xargs -n 1 git branch -d
<?php | |
function getPrivate($obj, $varName) | |
{ | |
return (function($varName){return $this->{$varName};})->call($obj, $varName); | |
} | |
function setPrivate($obj, $varName, $varValue) | |
{ | |
(function() use ($varName, $varValue){$this->{$varName} = $varValue;})->call($obj); | |
} |
DELETE | |
catalog_category_entity_int.* | |
FROM | |
catalog_category_entity_int | |
JOIN | |
catalog_category_entity ON | |
catalog_category_entity_int.entity_id = catalog_category_entity.entity_id | |
LEFT JOIN | |
eav_entity_attribute ON | |
( |
tar cf - . | pv -p -s `du -sb . | awk '{print $1}'` | gzip -9 > ../out.tgz |
<?php | |
echo '<!-- to prevent wpautop --><!-- <pre> --> | |
... your code here ... | |
<!-- </pre> -->'; |
# If you're not using a build process to manage your filename version | |
# revving, you might want to consider enabling the following directives | |
# to route all requests such as `/style.12345.css` to `/style.css`. | |
# | |
# To understand why this is important and even a better solution than | |
# using something like `*.css?v231`, please see: | |
# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|m?js|png|svgz?|webp|webmanifest)$ $1.$3 [L] |
for f in *; do tmp_f=`echo $f | tr "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\370\371\372\373\374\375\376\377" "aaaaaaaceeeeiiiienoooooouuuuyty"`; if [ "$tmp_f" != "$f" ]; then mv $f $tmp_f; echo "$f is renamed to $tmp_f"; fi done |
function sortByPriorityAsc(a, b) { | |
if (typeof b !== 'undefined') { | |
return (a.priority - b.priority) | |
} | |
var direction = a ? 1 : -1 ; | |
return function(a, b) { | |
return (a.priority - b.priority) * direction | |
} | |
} |
Git
remove merged branches
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |