- Restart with cmd-R or cmd-D
- Erase drive / 3x if second-hand
- Reinstall MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function custom_tax_init(){ | |
| //set some options for our new custom taxonomy | |
| $args = array( | |
| 'label' => __( 'My Custom Taxonomy' ), | |
| 'hierarchical' => true, | |
| 'capabilities' => array( | |
| // allow anyone editing posts to assign terms | |
| 'assign_terms' => 'edit_posts', | |
| /* but you probably don't want anyone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // in this case we have three ACF Relationship fields set up, they have the names | |
| // acf_rel_1, acf_rel_2, and acf_rel_3 (NOTE: these are the NAMES not the labels) | |
| // ACF stores post IDs in one form or another, so indexing them does us no good, | |
| // we want to index the title of the related post, so we need to extract it | |
| function my_searchwp_custom_fields( $customFieldValue, $customFieldName, $thePost ) { | |
| // by default we're just going to send the original value back |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?PHP | |
| // Generates a strong password of N length containing at least one lower case letter, | |
| // one uppercase letter, one digit, and one special character. The remaining characters | |
| // in the password are chosen at random from those four sets. | |
| // | |
| // The available characters in each set are user friendly - there are no ambiguous | |
| // characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option, | |
| // makes it much easier for users to manually type or speak their passwords. | |
| // | |
| // Note: the $add_dashes option will increase the length of the password by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| createjs.Graphics.prototype.dashedLineTo = function( x1 , y1 , x2 , y2 , dashLen ){ | |
| this.moveTo( x1 , y1 ); | |
| var dX = x2 - x1; | |
| var dY = y2 - y1; | |
| var dashes = Math.floor(Math.sqrt( dX * dX + dY * dY ) / dashLen ); | |
| var dashX = dX / dashes; | |
| var dashY = dY / dashes; | |
| var q = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <IfModule mod_deflate.c> | |
| #The following line is enough for .js and .css | |
| AddOutputFilter DEFLATE js css | |
| AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html | |
| #The following lines are to avoid bugs with some browsers | |
| BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| </IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * Grunt | |
| * $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
| */ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| // Sass |