http://www.codewars.com/kata/unpacking-arguments
http://www.codewars.com/kata/for-the-sake-of-argument
| # Add this to /config/bash_profile | |
| function wpd { | |
| export XDEBUG_CONFIG="idekey=VVVDEBUG remote_connect_back=1" | |
| wp "$@" | |
| unset XDEBUG_CONFIG | |
| }; | |
| # Run these commands: | |
| # vagrant ssh | |
| # sudo cp /srv/config/bash_profile /home/vagrant/.bash_profile | |
| # source ~/.bash_profile |
| <?php | |
| /* | |
| * Set the following constants in wp-config.php. | |
| * These should be added somewhere BEFORE the constant ABSPATH is defined. | |
| * | |
| * Author: Chad Butler | |
| * Author URI: https://butlerblog.com | |
| * | |
| * For more information and instructions, see: https://b.utler.co/Y3 |
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
| function direct_free_downloads_button($button) | |
| { | |
| global $product; | |
| if( $product->is_downloadable() AND $product->get_price() == 0 ) | |
| { | |
| $files = $product->get_files(); | |
| $files = array_keys($files); | |
| $download_url = home_url('?download_file='.$product->id.'&key='.$files[0].'&free=1' ); |
| <?php // ONLY COPY THIS LINE IF NEEDED! | |
| /** | |
| * Adds the ability to sort products in the shop based on the SKU | |
| * Can be combined with tips here to display the SKU on the shop page: https://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
| * | |
| * @param array $args the sorting args | |
| * @return array updated args | |
| */ | |
| function sv_add_sku_sorting( $args ) { |
| #!/usr/bin/env python2 | |
| import SimpleHTTPServer | |
| import SocketServer | |
| import logging | |
| PORT = 8000 | |
| class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
| <?php | |
| // In a class constructor | |
| $this->size_tax = wc_attribute_taxonomy_name( 'Size' ); | |
| $this->color_tax = wc_attribute_taxonomy_name( 'Color' ); | |
| // Insert the main product first | |
| // It will be used as a parent for other variations (think of it as a container) | |
| $product_id = wp_insert_post( array( |
Config is 2vCPU, 2 GB RAM and running Debian 7 on 64 bits.
apt-get update
apt-get upgrade
apt-get install htop
Add localadmin user
adduser localadmin
apt-get install sudo
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
๐