start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# USAGE: Will create a .tar.gz with CSVs of all tables in schema. | |
# Configure below and run as root (i.e. the user mysql runs as) | |
# | |
# The script will (or should) SELECT * INTO OUTFILE your tables | |
# and save them into csv files under /tmp dir first, then name them | |
# like the tables and move them thogether into a directory. Then | |
# it will tar everything together and chown you the tarball. | |
# Schema to export: |
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<?php | |
Route::get('protected', array('before' => 'auth|role:admin', function() { | |
return "Only admins can see this"; | |
})); | |
Route::filter('role', function ($role) { | |
if ( ! Auth::user()->has_role( $role ) ) | |
{ | |
return Response::error("401"); // not authorized |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
<a class="cart-contents" href="<?php echo WC()->cart->get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> |
<?php | |
// add hook | |
add_filter( 'wp_nav_menu_objects', 'my_wp_nav_menu_objects_sub_menu', 10, 2 ); | |
// filter_hook function to react on sub_menu flag | |
function my_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) { | |
if ( isset( $args->sub_menu ) ) { | |
$root_id = 0; | |
Everytime I tweet about losing weight and posting images, a lot of people ask questions - so thought I'd write something decent down about what I've done so far and am currently working on.
12 months change:
My diet used to be so so bad, energy drinks, constant sugar intake. Kill that! I also used to order takeaways at least 2-3 times a week, because it was easy and the bigger you get the lazier you get from my experience.