Skip to content

Instantly share code, notes, and snippets.

@wokamoto
wokamoto / wp-custom-search.php
Last active May 5, 2024 08:06
WordPress でユーザー名とか、タグ名・カテゴリ名も検索対象に
<?php
function custom_search($search, $wp_query) {
global $wpdb;
//サーチページ以外だったら終了
if (!$wp_query->is_search)
return $search;
if (!isset($wp_query->query_vars))
return $search;
@Gab-km
Gab-km / github-flow.ja.md
Last active October 29, 2024 10:17 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@kohki-shikata
kohki-shikata / zusaar_count
Last active December 16, 2015 03:19
WordPress Shortcode counts attendance from a Zusaar event
function zusaar_count($atts){
extract(shortcode_atts(array(
'zid' => null
), $atts));
// return $zid;
define("ZUSAAR_API_EVENT_URI", "http://www.zusaar.com/api/event/?event_id="); //イベント自体のデータを取得。開催日時の取得用
define("ZUSAAR_API_USER_URI", "http://www.zusaar.com/api/event/user/?event_id="); //イベント出席者のデータを取得
$today = time(); // 現在の日付を確認
@miya0001
miya0001 / Vagrantfile
Created December 11, 2013 16:12
3.8-RC2-ja用のVagrantfile VCCWの中に放り込んでから使って下さい。 https://github.com/miya0001/vagrant-chef-centos-wordpress
# encoding: utf-8
# vim: ft=ruby expandtab shiftwidth=2 tabstop=2
VAGRANTFILE_API_VERSION = "2"
#
# Configuration for the WordPress
#
WP_VERSION = '3.8-RC2' # latest or 3.4 or later or http(s):// URL to zipfile
@marcelosomers
marcelosomers / git-php-webhook.php
Last active October 17, 2024 17:17
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@gaspanik
gaspanik / gulpjs.markdown
Last active January 2, 2016 18:19
gulpjsの始め方。
@lsfalimis
lsfalimis / disable-OS-X-animation
Created May 4, 2014 01:32
disable OS X animation (10.9.2)
#Finder
#disable snap to grid animation
defaults write com.apple.finder AnimateSnapToGrid -bool false
#disable some animations
defaults write com.apple.finder DisableAllAnimations -bool true
#disable opening files zoom animation
defaults write com.apple.finder ZoomRects -bool false
@megane9988
megane9988 / gist:330e3ebcebb48bdd9ea5
Last active June 19, 2018 05:44
amazonlinux + nginx + php + mysql + WordPress + Git

amazonlinux + nginx + php + mysql + WordPress + Git

ec2 インスタンス取得

  • t2.micro
  • Security Group は ssh と http を any で通るようにする
    • 可能ならssh は固定IPだけで通るようにする
  • 鍵は、すでにあればそれでも、新たに制作してもOK
@mitsuruog
mitsuruog / index.md
Last active October 25, 2024 05:35
express実践入門

express実践入門


自己紹介

小川充

  • mitsuruog
@fumikito
fumikito / get_template_part.php
Created December 21, 2015 03:59
Alternative of WordPress' get_template_part which can accept arguments.
<?php
/**
* A template loader which accepts arguments.
*
* @param string $slug
* @param string|array $name
* @param array $args Arguments to pass.
* @param bool $echo If false, return string.
* @param string $glue Default is '-'. You can specify '/' which means directory separator.
*