Skip to content

Instantly share code, notes, and snippets.

@tokkonopapa
tokkonopapa / twitter.html
Created January 3, 2012 10:27
Octopressのスタイル設定とカスタマイズ
{% if site.twitter_follow_button %}
<a href="http://twitter.com/{{ site.twitter_user }}" class="twitter-follow-button" data-show-count="{{ site.twitter_show_follower_count }}" data-width="260px">Follow @{{ site.twitter_user }}</a>
{% else %}
<p>Follow <a href="http://twitter.com/{{site.twitter_user}}">@{{ site.twitter_user }}</a></p>
{% endif %}
@tokkonopapa
tokkonopapa / tag_cloud.rb
Created January 8, 2012 03:50
Tag Cloud for Octopress
# tag_cloud.rb
#
# Copyright (C) 2011 Anurag Priyam - MIT License
module Jekyll
# Jekyll plugin to generate tag clouds.
#
# The plugin defines a `tag_cloud` tag that is rendered by Liquid into a tag
# cloud:
@tokkonopapa
tokkonopapa / gist:2989052
Created June 25, 2012 14:39
Emoji cheat sheet for GitHub

People

:bowtie: 😄 😊 😃 ☺️ 😏 😍 😘 :kissing_face: 😳 😌 😆 😁 😉 :wink2: 👅 😒 😓 😔 😞 😖 😨 😰 😣 😢 😭 😂 😲 😱 😠 😡 😪 😷 👿 👽 💛 💙 💜 ❤️ 💚 💔 💓 💗 💘 ✨ ⭐ 🌟 💢 ❗ ❓ ❕ ❔ 💤 💨 💦 🎶 🎵 🔥 💩 💩 💩 👍 👍 👎 👎 👌 👊 ✊ ✌️ 👋 ✋ 👐 ☝️ 👇 👈 👉 🙌 🙏 👆 👏 💪 🤘 🚶 🏃 👫 💃 👯 🙆‍♀️ 🙅 💁 🙇 💏 💑 💆 💇 💅 👦 👧 👩

@tokkonopapa
tokkonopapa / gist:3164148
Created July 23, 2012 15:07
Gistでブログ

Gistのマークダウンでブログ

手順

  1. Gistで Markdown ファイルを作成する

  2. Create Public Gist する

@tokkonopapa
tokkonopapa / dabblet.css
Created October 18, 2012 01:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@tokkonopapa
tokkonopapa / function.php
Last active December 12, 2015 02:18
WPtouch switch for Quick Cache.
/**
* WPtouch switch for Quick Cache
* - WPtouch 1.9.6.1
* - Ktai Style 2.0.5
* - Quick Cache 111203
*
* Quick Cache MD5 Version Salt (smartphone, featurephone)
* ((preg_match("{AdsBot-Google|Android|BB10|BlackBerry 9350|BlackBerry 9360|BlackBerry 9370|BlackBerry 9380|BlackBerry 9780|BlackBerry 9790|BlackBerry 9800|BlackBerry 9810|BlackBerry 9850|BlackBerry 9860|BlackBerry 9900|BlackBerry 9930|BlackBerry9500|BlackBerry9520|BlackBerry9530|BlackBerry9550|CUPCAKE|Googlebot-Mobile|bada|dream|froyo|iPhone|iPod|incognito|s8000|webOS|webmate}", $_SERVER["HTTP_USER_AGENT"])) && $_COOKIE["wptouch_switch_toggle"] != "normal" ? "smartphone" : ((preg_match("{DoCoMo/|J-PHONE/|J-EMULATOR/|Vodafone/|MOT(EMULATOR)?-|SoftBank/|[VS]emulator/|KDDI-|UP\.Browser/|emobile/|Huawei/|IAC/|Nokia|mixi-mobile-converter/|DDIPOCKET;|WILLCOM;|Opera Mini|Opera Mobi|PalmOS|Windows CE;|PDA; SL-|PlayStation Portable;|SONY/COM|Nitro|Nintendo}", $_SERVER["HTTP_USER_AGENT"])) ? "featurephone" : ""))
*
* @todo add this program to theme fu
@tokkonopapa
tokkonopapa / myAjax.js
Created September 26, 2013 15:48
Simple Ajax only for JSONP
/*! Simple Ajax only for JSONP
*
* var args = {
* key: 'my-key',
* format: 'json'
* };
* myAjax.get('http://example.com/', args,
* function (response) {
* for (var key in response) {
* // key, response[key]
@tokkonopapa
tokkonopapa / ip-geo-block.php
Created July 15, 2015 12:07
IP Geo Block Emergency
<?php
/**
* IP Geo Block
*
* A WordPress plugin that blocks undesired access based on geolocation of IP address.
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-2.0+
* @link https://github.com/tokkonopapa
@tokkonopapa
tokkonopapa / ip-geo-block-settings-public.json
Last active October 15, 2016 10:01
IP Geo Block settings data
{
"ip_geo_block_settings[validation][public]": "1",
"ip_geo_block_settings[public][matching_rule]": "0",
"ip_geo_block_settings[public][white_list]": "",
"ip_geo_block_settings[public][black_list]": "ZZ",
"ip_geo_block_settings[public][ua_list]": "*#23.96.0.0/16\n*#HOST=amazonaws.com\n*#45.55.128.0/18",
"ip_geo_block_settings[public][advanced_cache]": "",
"ip_geo_block_settings[public][simulate]": "1"
}
@tokkonopapa
tokkonopapa / ip-geo-block-settings-performance.json
Last active November 19, 2016 09:47
IP Geo Block settings for performance measure.
{
"ip_geo_block_settings[version]": "3.0.0",
"ip_geo_block_settings[matching_rule]": "0",
"ip_geo_block_settings[white_list]": "JP",
"ip_geo_block_settings[black_list]": "ZZ",
"ip_geo_block_settings[extra_ips][white_list]": "192.0.64.0/18\n69.46.32.0/20",
"ip_geo_block_settings[extra_ips][black_list]": "",
"ip_geo_block_settings[signature]": "../,/wp-config.php,/passwd\ncurl,wget,eval,base64\nselect:.5,where:.5,union:.5\nload_file:.5,create:.6,password:.4",
"ip_geo_block_settings[response_code]": "403",
"ip_geo_block_settings[login_fails]": "5",