This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CD into local directory of files (Or checkout if don't have). | |
cd my-local-dir/ | |
# Check it's up to date. | |
svn up | |
# Make changes to the files in the trunk directory then check them against the remote. | |
# Files are flagged with M for modified. | |
svn stat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
<template> | |
</template> | |
<script> | |
export default { | |
data () { | |
return { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Saved at /usr/local/lib | |
# cd /usr/local/lib | |
# List globally installed packages | |
npm list -g --depth 0 | |
# List outdated globally installed packages | |
npm outdated -g --depth 0 | |
# Update globally installed package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="{{ preg_replace('/^(?!https?:\/\/)/', '//', $supplier->website) }}">Website</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checkout (Don't need LOCAL-DIR if already in it) | |
svn co https://plugins.svn.wordpress.org/PLUGIN-NAME/ LOCAL-DIR | |
# Let svn know about new files ready for a commit (after adding the actual files to the local directory) | |
# Don't need this if amending an exists versioned file | |
svn add DIR/* | |
svn add DIR/FILENAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install composer. Moving to /usr/local/bin/composer means it can now be run as composer COMMAND rather php composer.phar COMMAND | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
# Download Laravel installer. | |
composer global require "laravel/installer=~1.1" | |
# Add to $PATH https://gist.github.com/malinky/e7fb7e4a757c4bbd5acc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add the below to the start and then end .sql file */ | |
SET foreign_key_checks = 0; | |
SET foreign_key_checks = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 1. Stop image blurring on scale. | |
*/ | |
img { | |
transition: transform 0.15s ease-in-out; | |
backface-visibility: hidden; /* 1 */ | |
transform: translateZ(0); /* 1 */ | |
} | |
img:hover { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Delete revisions */ | |
DELETE FROM wp_posts WHERE post_type = "revision"; | |
/** | |
* Also set in wp-config.php | |
* define( 'WP_POST_REVISIONS', 3 ); | |
*/ | |
/* Clean postmeta where the associated post no longer exists */ | |
SELECT * FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* See http://benalman.com/news/2010/11/immediately-invoked-function-expression/ for a better explanation | |
*/ | |
<script> | |
function test() { | |
console.log('function declaration that is called with test()'); | |
} | |
test(); | |
(function test() { | |
console.log('immediately invoked function declaration wrapped in brackets (turned into an expression)'); |