Skip to content

Instantly share code, notes, and snippets.

@makotokw
makotokw / uncrustify.cfg
Last active August 29, 2015 13:57
My Uncrustify configration for Objective-C
# Uncrustify 0.60
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="AndroidStyle">
<option name="JAVA_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
@makotokw
makotokw / header_ogp.php
Last active October 9, 2018 14:06
Open Graph protocol for WordPress
<?php
/**
* Open Graph protocol for WordPress
* @version 0.9.2
* @author makoto_kw
* @link https://gist.github.com/3399585
*/
// key into custom fields for description. Default is for All in One SEO Pack
define('WP_OGP_POST_DESCRIPTION_KEY', '_aioseop_description');
@makotokw
makotokw / qt.replace.js
Created September 25, 2010 14:53
jgt.replace.js added iUI style replacement
(function($){
if ($.jQTouch) {
$.jQTouch.addExtension(function ReplaceLoad(jQT){
function load($anchor, $replace) {
if ($anchor.hasClass('loading')) return;
$anchor.addClass('loading active');
$.get($anchor.attr('href'), function(data) {
$replace.after(data).remove();
});
}
@makotokw
makotokw / ext-touch-crx.js
Created September 25, 2010 14:51
Sencha touch for Chrome Extension
/*
* Sencha touch for Chrome Extension
* Copyright(c) 2010 makoto_kw
* @license GNU GPL license v3
*/
if (Ext) {
Ext.apply(Ext.is, {
ChromeExtension: true
});
Ext.apply(Ext.Ajax, {
@makotokw
makotokw / syntaxhighlighter-for-legacy.php
Created December 26, 2009 06:53
WordPress Plugin, apply code highlight to the Syntaxhighlighter 1.5 style by Syntaxhighlighter Evolved.
<?php
/*
Plugin Name: Syntaxhighlighter for Legacy
Description: apply code highlight to the Syntaxhighlighter 1.5 style by Syntaxhighlighter Evolved.
Version: 1.0
Author: makoto_kw
Author URI: http://www.makotokw.com/
*/
function SyntaxhighlighterEvolvedForPlaneHtml($text) {
global $SyntaxHighlighter;
@makotokw
makotokw / syntaxhighlighter-for-movable-type-to-evolved.php
Created December 10, 2009 04:55
WordPress Plugin, Convert 'SyntaxHighlighter for Movable Type' style to SyntaxHighlighter Evolved style
<?php
/*
Plugin Name: Syntaxhighlighter For Movable Type to Evolved
Description: Convert 'SyntaxHighlighter for Movable Type' style to SyntaxHighlighter Evolved style
Version: 1.0
Author: makoto_kw
Author URI: http://www.makotokw.com/
*/
function SyntaxhighlighterForMovableType2Evolved($text) {
return preg_replace('/\[code:([\w#+-]+)\]/s','[code lang="$1"]', $text);
@makotokw
makotokw / pukiwiki2evernote.php
Created December 7, 2009 07:44
PukiWiki 2 Evernote
<?php
// PukiWiki 2 Evernote
//
// @version 1.00
//
// this script is freely distributable under the terms of new BSD license.
// Copyright (c) 2009, makoto_kw All rights reserved.
//
// How to Use
@makotokw
makotokw / gist.inc.php
Created November 11, 2009 10:15
PukiWiki gist plugin
<?php
/**
* gist.inc.php - embed gist
*
* Usage:
* #gist(231844)
* &gist(231844);
*
* @author makoto_kw
* @licence http://www.gnu.org/licenses/gpl.html GPLv2
@makotokw
makotokw / x.js
Created September 3, 2009 03:27
makoto_kw's Ubiquity Commands
/**
* Ubiquity Commands
* @author makoto_kw
* @see http://gist.github.com/180114
*/
Cu.import("resource://ubiquity/modules/oauth.js");
(function($){
var author = { name: 'makoto_kw', email: 'makoto.kw+ubiquity@gmail.com'};