As configured in my dotfiles.
start new:
tmux
start new with session name:
<?php | |
/** | |
* Callback function for taxonomy meta boxes | |
* | |
* A simple callback function for 'meta_box_cb' argument | |
* inside register_taxonomy() that replaces the regular | |
* checkboxes with a plain dropdown list | |
* | |
* @param [type] $post [description] | |
* @param [type] $box [description] |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
# Example MySQL config file for large systems. | |
# | |
# This is for a large system with memory = 512M where the system runs mainly | |
# MySQL. | |
# | |
# MySQL programs look for option files in a set of | |
# locations which depend on the deployment platform. | |
# You can copy this option file to one of those | |
# locations. For information about these locations, see: | |
# http://dev.mysql.com/doc/mysql/en/option-files.html |
As configured in my dotfiles.
start new:
tmux
start new with session name:
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………
<?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; | |
} |
If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install
without entering credentials.
If you have used other Github packages from
{my-org}
before, you may be able to skip this step.
Click Generate new token.
#!/usr/bin/env bash | |
#################################################################################### | |
# Slack Bash console script for sending messages. | |
#################################################################################### | |
# Installation | |
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
# $ chmod +x /usr/bin/slack | |
#################################################################################### | |
# USAGE | |
# Send message to slack channel/user |