Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| /** | |
| * Filter out hard-coded width, height attributes on all images in WordPress. | |
| * https://gist.github.com/4557917 | |
| * | |
| * This version applies the function as a filter to the_content rather than send_to_editor. | |
| * Changes made by filtering send_to_editor will be lost if you update the image or associated post | |
| * and you will slowly lose your grip on sanity if you don't know to keep an eye out for it. | |
| * the_content applies to the content of a post after it is retrieved from the database and is "theme-safe". | |
| * (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.) | |
| * |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Bootstrap Masonry Template</title> | |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="style.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700"> |
| // Move Yoast to bottom | |
| function yoasttobottom() { | |
| return 'low'; | |
| } | |
| add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |
| <?php | |
| $query1 = new WP_Query($arg1); | |
| $query2 = new WP_Query($arg2); | |
| $query = new WP_Query(); | |
| $query->posts = array_merge( $query1->posts, $query2->posts ); | |
| // we also need to set post count correctly so as to enable the looping |
| # based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files | |
| # but modified for the MAMP path and to include default root/root as username and password | |
| for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done |
| <midi app="1.7.2.4139"> | |
| <control channel="1" event_type="Note On" control="0"> | |
| <userio event="click"> | |
| <auto_loop_specific_length deck_set="Default" deck_id="0" slot_id="5"> | |
| <translation action_on="any" behaviour="explicit"/> | |
| </auto_loop_specific_length> | |
| </userio> | |
| <userio event="output"> |
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
| <?php | |
| class WP_HTML_Compression | |
| { | |
| // Settings | |
| protected $compress_css = true; | |
| protected $compress_js = true; | |
| protected $info_comment = true; | |
| protected $remove_comments = true; | |
| // Variables |
| // ==UserScript== | |
| // @name Medium: remove location hash | |
| // @namespace http://efcl.info/ | |
| // @description Remove location hash from medium | |
| // @include https://medium.com/*#* | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| function removeLocationHash(){ |