First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
/** | |
* Adds a transparent noise texture as a background image to a given element. | |
* Texture strength can be controlled with @opacity parameter. | |
*/ | |
.noise (@opacity: .3) { | |
&:before { | |
bottom: 0; | |
content: ""; | |
left: 0; | |
opacity: @opacity; |
// remove username:password if you don't need htpasswd auth | |
add_filter('wp_get_attachment_url', function($url) { | |
$upload_dir = wp_upload_dir(); | |
$file_path = str_replace(site_url() . '/wp-content/uploads', $upload_dir['basedir'], $url); | |
// check to see if the file exists locally first | |
if ( file_exists($file_path) ) { | |
return $url; |
add_action( 'tgmpa_register', 'register_required_plugins' ); | |
// This function is called from the above hook | |
function register_required_plugins() | |
{ | |
// The plugins array allows us to define multiple plugins we want to include. | |
// The commented out example shows how we can include and activation a bundled | |
// plugin zip file in our theme. | |
$plugins = array( | |
/* array( |
<!-- | |
source: http://wordpress.stackexchange.com/a/53516/7577 | |
--> | |
<a id="buy" href="#">Buy this!</a> | |
<script> | |
$('#buy').click(function(e) { | |
e.preventDefault(); | |
addToCart(19); | |
return false; | |
}); |
First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb
add_filter('woocommerce_cross_sells_total', 'cartCrossSellTotal'); | |
function cartCrossSellTotal($total) { | |
$total = '3'; | |
return $total; | |
} |
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
<?php | |
$pages = new query_loop( array( | |
'post_type' => 'page' | |
)); | |
foreach( $pages as $id => $post ) { | |
the_title(); | |
// etc... | |
} |
Makes 5 users each with 1 team that has 5 members
Add a team factory to database/factories/ModelFactory.php
$factory->define(App\Team::class, function (Faker\Generator $faker) {
return [
'name' => $faker->sentence,
<?php | |
// reference https://github.com/WP-API/WP-API/blob/develop/lib/infrastructure/class-wp-rest-server.php | |
// serve_request() function | |
add_filter( 'rest_pre_serve_request', 'multiformat_rest_pre_serve_request', 10, 4 ); | |
function multiformat_rest_pre_serve_request( $served, $result, $request, $server ) { | |
// assumes 'format' was passed into the intial API route | |
// example: https://baconipsum.com/wp-json/baconipsum/test-response?format=text |