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
# Xdebug aliases | |
alias xdebug_on='sudo phpenmod xdebug; sudo service php7.0-fpm restart;' | |
alias xdebug_off='sudo phpdismod xdebug; sudo service php7.0-fpm restart;' |
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
<?php | |
// Number of elements which make up the association table. | |
fscanf(STDIN, "%d", $N); | |
// Number Q of file names to be analyzed. | |
fscanf(STDIN, "%d", $Q); | |
// File extensions to MIME types assosciations | |
$ext_to_MIME = array(); |
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
jQuery(document).ready(function($) { | |
/** | |
* Improve anchors click behaviour: | |
* - Scroll to hash | |
* - Prevent useless refresh when clicking on same page links | |
*/ | |
$('a').on('click', function(event) { | |
var $this = $(this); |
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
# CD to the document root. | |
cd /var/www/public/ | |
# Update WP-CLI if needed. | |
sudo wp cli update --allow-root --yes | |
# Download WordPress if needed. | |
wp core download | |
# Create configuration file. |
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
#!/usr/bin/env bash | |
# | |
# `packer-builder-vagrant` Insaller (Linux and Mac) | |
# = | |
# | |
# Description | |
# == | |
# | |
# Script to install or update [packer-builder-vagrant](https://github.com/themalkolm/packer-builder-vagrant). |
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
#!/usr/bin/env bash | |
D='wp-content/backup'; | |
mkdir -p $D; | |
wp db export $D/"`date +"db-%s-%F-%H-%M-%S.sql"`" --add-drop-table |
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
/** | |
* Author: Heather Corey | |
* jQuery Simple Parallax Plugin | |
* https://www.bootply.com/zrATdhAKBZ | |
*/ | |
(function($) { | |
$.fn.parallax = function(options) { | |
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
<?php | |
/** | |
* The message sender ID (0 for current user). | |
*/ | |
define('CA64026_SENDER_ID', 1); | |
/** | |
* What username to use for guests. | |
*/ |
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
find . -iname "*.php" | xargs xgettext \ | |
--language=PHP \ | |
--package-name=Example \ | |
--package-version=1.0.0 \ | |
--from-code=UTF-8 \ | |
--keyword="__" \ | |
--keyword="__ngettext:1,2" \ | |
--keyword="__ngettext_noop:1,2" \ | |
--keyword="_c,_nc:4c,1,2" \ | |
--keyword="_e" \ |
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
<?php | |
add_action( 'option_permalink_structure', function() { | |
return '/example/%postname%/'; | |
} ); |