例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
以下転載:
var Loader = (function () { | |
function Loader(options) { | |
this.options = options; | |
if (resource.scripts && resource.baseUrl) { | |
for (var i = 0; i < this.options.scripts.length; i++) { | |
this.load('js', this.options.scripts[i]); | |
} | |
for (var i = 0; i < this.options.stylesheets.length; i++) { | |
this.load('css', this.options.stylesheets[i]); | |
} |
<?php | |
trigger_error("This file should not be included, only analyzed by your IDE", E_USER_ERROR); | |
$wp_the_query = new WP_Query(); | |
/** @var WP_Query $wp_query */ | |
$wp_query = $wp_the_query; | |
$wp_rewrite = new WP_Rewrite(); | |
$wp = new WP(); |
<?php | |
// CPIユーザーID(契約情報で確認してください) | |
$user_id = 'abc123defg'; | |
// リポジトリ名(Backlogで確認してください) | |
$repo_name = 'repository_name'; | |
// Gitレポジトリの位置の指定 | |
$git_dir = '/usr/home/' . $user_id . '/' . $repo_name . '.git'; | |
// 展開先ディレクトリの指定 | |
$work_tree = '/usr/home/' . $user_id . '/html'; | |
// logファイルの指定 |
<?php | |
$version = 'default'; | |
$stylesheet_dir = get_stylesheet_directory(); | |
if ( file_exists( $stylesheet_dir.'/.git/HEAD' ) ) { | |
$head = explode(' ', trim(file_get_contents($stylesheet_dir.'/.git/HEAD')) ); | |
if ( isset($head[1]) && file_exists($stylesheet_dir.'/.git/'.$head[1]) ) { | |
$version = trim(file_get_contents($stylesheet_dir.'/.git/'.$head[1])); | |
} | |
} | |
define( 'THEME_VERSION', $version ); |
<?php | |
/* | |
Plugin Name: Get Remote Image to Custom Field | |
*/ | |
add_filter('really_simple_csv_importer_post_saved', function($post) | |
{ | |
if (is_object($post)) { | |
// Get the meta data of which key is "image" | |
$image = $post->image; |
<?php | |
Class Admin_Column_Custom_Field { | |
/** @var string */ | |
private $field_key; | |
/** @var string */ | |
private $field_label; |
// strip-units required by spread mixin | |
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass | |
@function strip-units($number) | |
@return $number / ($number * 0 + 1) | |
// pow and sqrt required by ease function | |
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss | |
@function pow($base, $exponent) | |
$value: $base |
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm