This file contains 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
(function($) { | |
'use strict'; | |
/*global jQuery*/ | |
/*global document*/ | |
$(function() { | |
// Make sure this only applies to browsers | |
// without placeholder support | |
if (document.createElement("input").placeholder !== undefined) { return false; } |
This file contains 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
git log --shortstat --since "2 weeks ago" --until "now" -p ./ | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}' |
This file contains 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
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var uglify = require('gulp-uglify'); | |
var imagemin = require('gulp-imagemin'); | |
var coffee = require('gulp-coffee'); | |
var stylus = require('gulp-stylus'); | |
// Copy assets | |
gulp.task('assets', function() { | |
gulp.src('client/assets/**') |
This file contains 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
# Installing Composer | |
mkdir ~/bin | |
mkdir ~/bin/composer | |
cd ~/bin/composer | |
wget https://getcomposer.org/composer.phar --no-check-certificate | |
php composer.phar init --author "Morten Najbjerg <[email protected]>" | |
# Installing drush and setting up alias | |
echo "export COLUMNS" >> ~/.bashrc | |
echo "alias composer='php -d allow_url_fopen=on ~/bin/composer/composer.phar'" >> ~/.bashrc |
This file contains 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. Run key generator on deployment server | |
ssh-keygen | |
# 2. Copy the content of id_rsa.pub usin VIM | |
vim ~/.ssh/id_rsa.pub | |
# 3. Add the id_rsa.pub to Deployment keys in Bitbucket | |
# 4. Add Bitbucket to known_hosts on deployment server | |
ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts |
This file contains 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
mkdir ~/bin | |
mkdir ~/bin/wp-cli | |
cd ~/bin/wp-cli | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
echo "export COLUMNS" >> ~/.bashrc | |
echo "alias wp='php ~/bin/wp-cli/wp-cli.phar'" >> ~/.bashrc | |
echo "alias php='/usr/bin/php'" >> ~/.bashrc | |
source ~/.bashrc | |
echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc |
This file contains 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
import inViewport from 'in-viewport'; | |
/** | |
* Use like this: | |
* | |
* <div class="transition duration-500" data-inview-before="opacity-0" data-inview-after="opacity-100">Fade me in</div> | |
*/ | |
document.addEventListener('DOMContentLoaded', () => { | |
var inviewEls = document.querySelectorAll('[data-inview'); | |