Skip to content

Instantly share code, notes, and snippets.

View waviaei's full-sized avatar
🤔

Toru Miki waviaei

🤔
View GitHub Profile
@miya0001
miya0001 / gist:7480577
Last active December 28, 2015 09:39
プラグインが有効かどうかを調べる
<?php
function is_active($plugin)
{
if (function_exists('is_plugin_active')) {
return is_plugin_active($plugin);
} else {
return in_array(
$plugin,
get_option('active_plugins')
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@wokamoto
wokamoto / wp_uploads_file_move.php
Created October 29, 2013 11:03
[WordPress] 年月別にディレクトリに保存していなかったファイルを年月別に保存しなおしちゃう奴 2行目、/path/to/wordpress/ を修正して使ってね
<?php
require_once('/path/to/wordpress/wp-load.php');
// file permision
$perms = 0655;
global $_wp_additional_image_sizes;
$siteurl = get_option( 'siteurl' );
$upload_path = get_option( 'upload_path' );
@miya0001
miya0001 / gist:6668263
Last active October 9, 2017 05:19
WordPressコアに対するパッチの作り方
========
パッチの作り方
========
$ mkdir wordpress
$ cd wordpress # ここがドキュメントルート
$ svn co http://develop.svn.wordpress.org/trunk/ .
$ svn update # 作業を行う直前に毎回実行!
ファイルを追加した場合は `svn add` でそのファイルを追加する。
@wokamoto
wokamoto / jetpack_disable_open_graph.php
Last active December 11, 2015 20:39
[WordPress] Jetpack プラグインに OGP タグを書き出させないようにする方法
<?php
add_filter( 'jetpack_enable_opengraph', '__return_false', 11 );
// または
add_action( 'plugins_loaded', function(){
remove_action( 'wp_head', 'jetpack_og_tags' );
});
@studiomohawk
studiomohawk / making-of-cssradar-at-twitter.md
Last active April 26, 2016 16:21
Making of CSS Radar @ Twitter

Making of CSS Radar @ Twitter

CSS Radar @ Twitterの(短い)歴史

ほとんど更新されないのがコンセプトのCSS Radarの代わりにTwitterを使って海外のフロントエンドな情報を共有しはじめたのがいつのことだったかはあんまり定かではない。 当の本人は結構やってるんじゃないかと思ったりもするが、きっとそんなことはないのだろう。

紹介する記事のトピックや量は時間の経過と共に変化してきたが、変わらないことが1つだけ。
それはどの記事も必ず読んでから紹介すること。
今年に入って、Gistを使って5件ずつ紹介しはじめたのは、Twitterでは説明しきれていない部分が多すぎると思ったからだ。

@markjaquith
markjaquith / gist:4487609
Created January 8, 2013 20:25
WordPress ASCII art.
<!--
`-/+osssssssssssso+/-`
./oys+:.` `.:+syo/.
.+ys:. .:/osyyhhhhyyso/:. ./sy+.
/ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/
/h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/
:ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh:
`sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys`
.ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh.
{
"color_scheme": "Packages/User/Solarized (light).tmTheme",
"font_face": "Source Code Pro",
"font_size": 14.0,
"ignored_packages":
[
"Vintage"
],
"open_files_in_new_window": false,
"theme": "Soda Light.sublime-theme",
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/