- Go to: 'System Preferences' >> 'MySQL' and stop MySQL
OR,
- sudo /usr/local/mysql/support-files/mysql.server start
- sudo /usr/local/mysql/support-files/mysql.server stop
// Parallax-like interaction "stolen" from https://www.awwwards.com/PWA-ebook | |
window.addEventListener('mousemove', move); | |
function move(){ | |
var w = window, | |
d = document, | |
e = d.documentElement, | |
g = d.getElementsByTagName('body')[0], | |
window_width = w.innerWidth||e.clientWidth||g.clientWidth, |
AFG : Afghanistan
AGO : Angola
ALB : Albania
ARE : United Arab Emirates
ARG : Argentina
ARM : Armenia
ATA : Antarctica
ATF : French Southern and Antarctic Lands
AUS : Australia
AUT : Austria
Changing a remote's URL
git remote set-url origin NEW_REMOTE_URL
Clone single branch from repo
git clone -b BRANCH_NAME --single-branch REPO_URL
/// Responsive breakpoint manager | |
/// @access public | |
/// @param {String} $breakpoint - Breakpoint name | |
/// @requires $breakpoints | |
@mixin respond-to($breakpoint) { | |
$raw-query: map-get($breakpoints, $breakpoint); | |
@if $raw-query { | |
$query: if( | |
type-of($raw-query) == 'string', |
<?php | |
// Add '<b>' tags to search terms in results | |
function namespace_highlight_results($text){ | |
if ( is_search() && !is_admin() ){ | |
$sr = get_query_var('s'); | |
$keys = explode(" ",$sr); | |
$keys = array_filter($keys); | |
$text = preg_replace('/('.implode('|', $keys) .')/iu', '<b>'.$sr.'</b>', $text); | |
} | |
return $text; |
function custom_tax_init(){ | |
//set some options for our new custom taxonomy | |
$args = array( | |
'label' => __( 'My Custom Taxonomy' ), | |
'hierarchical' => true, | |
'capabilities' => array( | |
// allow anyone editing posts to assign terms | |
'assign_terms' => 'edit_posts', | |
/* but you probably don't want anyone |
#!/bin/sh | |
# Import a large sql dump file to a MySQL database from command line | |
# https://cmanios.wordpress.com/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line/ | |
# store start date to a variable | |
imeron=`date` | |
echo "Import starting..." | |
dumpfile="/path/to/dumpfile.sql" |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.21" |