Skip to content

Instantly share code, notes, and snippets.

Takuro Hishikawa hissy

Block or report user

Report or block hissy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hissy
hissy / gist:1272614
Created Oct 8, 2011
SuperCollider Stacked Chord Loop
View gist:1272614
(
// SynthDef
SynthDef("up-piano-20", {
arg freq=440, gate=1, amp=1, pan=0, downRate=20000, mix=0.25, room=0.15, damp=0.5;
var x, y, env;
env = Env.asr(5,1,5, -3);
x = SinOsc.ar(freq,0,amp);
y = LFNoise2.ar(0.2,downRate/100,downRate);
x = Latch.ar(x, Impulse.ar(y));
x = FreeVerb.ar(x,mix,room,damp);
@hissy
hissy / gist:1391436
Created Nov 24, 2011
concrete5: Add Header Item
View gist:1391436
<?php
$html = Loader::helper('html');
$this->addHeaderItem($html->javascript($this->getThemePath().'/original.js'));
?>
@hissy
hissy / gist:1510653
Created Dec 22, 2011
concrete5japan: what we changed in the former japanese edition
View gist:1510653
t抜け、言語ファイル、sample_content.sql以外
デフォルトの言語を日本語に設定。
https://github.com/concrete54japan/concrete5/commit/5bdda2cda2fb13bd5b79dde5c0de4183208cff87
日本語URL対応とインストール画面の日本語化
https://github.com/concrete54japan/concrete5/commit/41bd7a19adc434c3dff0354f0c000d614c2f1a93
日本語URL対応漏れ
https://github.com/concrete54japan/concrete5/commit/862ece76b0d08b030bdde3bec725f61997e49157
@hissy
hissy / c5-open-graph-tags.php
Created Jan 19, 2012
Open Graph Tags Setting for concrete5 site
View c5-open-graph-tags.php
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!-- Open Graph Tags Start -->
<?php
$page = Page::getCurrentPage();
$pageTitle = $page->getCollectionName();
$pageMetaTitle = $page->getCollectionAttributeValue('meta_title');
if ( $pageMetaTitle ) $pageTitle = $pageMetaTitle;
$pageOgTitle = $page->getCollectionAttributeValue('og_title');
if ( $pageOgTitle ) $pageTitle = $pageOgTitle;
$pageOgType = $page->getCollectionAttributeValue('og_type');
@hissy
hissy / wp-query-ref.php
Last active Feb 6, 2019 — forked from luetkemj/wp-query-ref.php
WP: Query $args
View wp-query-ref.php
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
* Japanese translated by hissy
*
* CODEX: http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query#.E3.83.91.E3.83.A9.E3.83.A1.E3.83.BC.E3.82.BF
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
* Original: https://gist.github.com/luetkemj/2023628/9e911982440141a13cb1dd8ba1ad6b35cd7bbdd7
*/
@hissy
hissy / functions.php
Created Mar 24, 2012
Use jQuery Masonry in WordPress Theme
View functions.php
<?php
/**
* Enqueue scripts and styles
*/
function load_scripts() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' );
$dir = get_stylesheet_directory_uri();
wp_enqueue_script( 'jquery-masonry', $dir.'/js/jquery.masonry.min.js', array('jquery'), false, true );
@hissy
hissy / map.js
Created Mar 26, 2012
Show Multiple Markers on Google Map from JSON
View map.js
jQuery(document).ready(function(){
jQuery("#map").each(function(){
SpotSearchMap = new SpotSearchMapObj(36.5626,136.362305, 8);
});
});
var Marker;
var SpotSearchMap;
var SpotSearchMapObj = Class.create();
SpotSearchMapObj.prototype = {
@hissy
hissy / Phoenix_BankPayment.csv
Created Apr 3, 2012
Japanese Translation for Magento BankPayment Extension
View Phoenix_BankPayment.csv
Bank Prepayment 銀行振込
Pay within X days X日以内に支払い
Please transfer the money within %s days to the following bank account 下記の銀行口座に%s日以内にお振込みください
Please transfer the money to the following bank account 下記の銀行口座にお振込みください
Please transfer the money within %s days to one of the following bank accounts 下記の銀行口座のいずれかに%s日以内にお振込みください
Please transfer the money to one of the following bank accounts 下記の銀行口座のいずれかにお振込みください
Account holder 口座名義
Account number 口座番号
Account number1 口座番号
Sort code Sort code
@hissy
hissy / gist:2317154
Created Apr 6, 2012
第10回 WordBench神戸のネタ
View gist:2317154
@hissy
hissy / gist:2886355
Last active Oct 5, 2015
#WordPress Get Toplevel Ancestor Page
View gist:2886355
<?php
/**
* Returns top level ancestor page
*
* Usage: $toplevel = get_toplevel_ancestor_page(get_the_ID());
*
* @param int|object $post Post ID or post object. Optional, default is the current post from the loop.
* @return WP_Post|null WP_Post on success or null on failure
*/
function get_toplevel_ancestor_page( $post ) {
You can’t perform that action at this time.