Skip to content

Instantly share code, notes, and snippets.

@BrandonKnudsen
BrandonKnudsen / WP_Post_Move.php
Created March 16, 2022 15:48
Wordpress Move posts to new post type by category
<?php
ob_start( );
$args = array(
'category_name' => 'category-slug',
'posts_per_page' => -1
);
$the_query = new WP_Query( $args );
// The Loop
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@BrandonKnudsen
BrandonKnudsen / meow.php
Created April 7, 2021 21:25
Easy way to see server vars. Meow!
<pre>
<?php print_r($_SERVER); ?>
</pre>
1. download PECL:
$ curl -O https://pear.php.net/go-pear.phar
2.install PECL in MAMP PHP folder:
$ sudo php -d detect_unicode=0 go-pear.phar
!!! make sure the installation directories look like this: !!!
1. Installation base ($prefix) : /Applications/MAMP/bin/php/php7.4.9
2. Temporary directory for processing : /tmp/pear/install
@BrandonKnudsen
BrandonKnudsen / .gitignore
Created April 6, 2020 22:01 — forked from ericelliott/.gitignore
Sample Node project .gitignore
node_modules
build
npm-debug.log
.env
.DS_Store