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_filter( | |
| 'snow_monkey_breadcrumbs', | |
| function( $items ) { | |
| if ( isset( $items[2] ) && preg_match( '/\/category\//', $items[2]['link'] ) ) { | |
| array_splice( $items, 2, 1 ); | |
| } | |
| return $items; |
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
| #!/bin/sh | |
| # Download and add Nginx signing key. | |
| wget http://nginx.org/keys/nginx_signing.key | |
| sudo apt-key add nginx_signing.key | |
| # Add apt source | |
| echo "deb http://nginx.org/packages/mainline/debian/ stretch nginx" | sudo tee -a /etc/apt/souces.list.d/nginx.list | |
| wget -O sury.sh https://packages.sury.org/php/README.txt |
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
| #!/usr/bin/env bash | |
| set -e | |
| # リモートホスト設定 | |
| REMOTE_HOST='example.com' | |
| REMOTE_PATH='/var/www/html' | |
| REMOTE_URI='//example.com' | |
| # ローカルホスト設定 |
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
| var ua = navigator.userAgent.toLowerCase(); | |
| var isLollipop = ua.indexOf("android 5") > -1; // If Android 5.x is true | |
| var isAndroid4x = ua.indexOf("android 4") > -1; // If Android 4.x is true | |
| var isAndroid2x = ua.indexOf("android 2") > -1; // If Android 2.x is true | |
| var isOldAndroid = isLollipop || isAndroid4x || isAndroid2x; // Return true if Android version is 5.x or older | |
| if (isOldAndroid) { | |
| // Write here. | |
| } |
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
| #!/bin/sh | |
| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https | |
| sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
| sudo echo "deb https://apt.dockerproject.org/repo debian-jessie main" | sudo tee --append /etc/apt/sources.list.d/docker.list | |
| sudo apt-get update | |
| sudo apt-get install -y docker-engine | |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
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
| var url = "https://graph.facebook.com/?id=" + window.location.href + "&scrape=true"; | |
| $.post( url ); |
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
| server { | |
| listen [::]:8080; | |
| listen 8080; | |
| server_name ~^(.*)\.dev\.test$; | |
| root /usr/local/var/www/$1; | |
| index index.php index.html index.htm; |
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
| #user nginx nginx; | |
| worker_processes 1; | |
| error_log /usr/local/var/log/nginx/error.log debug; | |
| pid /usr/local/var/run/nginx.pid; | |
| events { | |
| worker_connections 256; | |
| } |