Skip to content

Instantly share code, notes, and snippets.

@k-ishiwata
k-ishiwata / 0_reuse_code.js
Created March 25, 2014 10:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@k-ishiwata
k-ishiwata / simplefacebook.js
Created October 9, 2012 04:12
googleapisを利用してFacebookページのウォールを表示するサンプルです。
$(function() {
var formatData = function(date) {
var d = new Date(date);
//ゼロパディング(2桁)にしない場合
//return (d.getFullYear() + '.' + (d.getMonth() + 1) + '.' + d.getDate());
return (d.getFullYear() + '.' + ("0"+(d.getMonth()+1)).slice(-2) + '.' + ("0"+d.getDate()).slice(-2));
};
var replaceURL = function(url){
url = url.replace(/(\/l.php\?u=http%3A%2F%2F)([\x21-\x7e]+)(&h=[\x21-\x7e]+&s=1)/gi,'http://$2');
return unescape(url);
@k-ishiwata
k-ishiwata / html5-fileAPI.js
Created December 13, 2012 01:26
HTML5のFile API サンプル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>File API Sample</title>
<style type="text/css">
#file-input div.input {
padding: 60px;
border: solid 1px #333;
width: 300px;
<?php
/*
Plugin Name: Show Text
Plugin URI: http://www.webopixel.net/wordpress/631.html
Description: プラグイン開発説明用のプラグイン
Author: k.ishiwata
Version: 0.1
Author URI: http://www.webopixel.net
*/
@k-ishiwata
k-ishiwata / lfm.php
Created July 6, 2017 08:27
Laravel File Manager の日本語ファイル resources/lang/vendor/laravel-filemanager/ja/lfm.php
<?php
return [
'nav-back' => '戻る',
'nav-new' => '新規フォルダ',
'nav-upload' => 'アップロード',
'nav-thumbnails' => 'サムネイル',
'nav-list' => 'リスト',
'nav-sort' => 'ソート',
'nav-sort-alphabetic'=> 'ファイル名順',
@k-ishiwata
k-ishiwata / gutenberg-custom-sidebar.js
Last active April 2, 2021 14:41
Gutenbergの既存ブロックを拡張するサンプル
const { assign } = lodash;
const { __ } = wp.i18n;
const { Fragment } = wp.element;
const { addFilter } = wp.hooks;
const {
PanelBody,
RadioControl
} = wp.components;
const {
@k-ishiwata
k-ishiwata / custom-meta-table.php
Created September 28, 2012 01:33
WordPressでカスタムフィールドの値をオリジナルのテーブル(DB)に保存する
<?php
/*
Plugin Name: Custom Meta Table
Plugin URI: http://www.webopixel.net/wordpress/637.html
Description: カスタムフィールドの値をオリジナルのテーブル(DB)に保存する
Author: k.ishiwata
Version: 0.1
Author URI: http://www.webopixel.net/
*/
class CustomMetaTable {