View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View append_noopener.js'a')).forEach(function(element) {
if ( === '_blank' && element.rel.indexOf('noopener') === -1) {
element.rel += ' noopener';
# this file added ~/.bashrc
# fork from
function __show_exit_code() {
local status=$(echo ${PIPESTATUS[@]})
local SETCOLOR_FAILURE="echo -en \\033[1;31m"
local SETCOLOR_NORMAL="echo -en \\033[0;39m"
for s in ${status}
if [ ${s} -ne 0 ]; then
View wp_ad_switch.js
(function() {
var metas = document.getElementsByTagName('head')[0].getElementsByTagName('meta');
for (var index = 0; index < metas.length; index++) {
if (metas[index].name === 'keywords' && metas[index].content.indexOf('技術系') !== -1) {
View gist:83626973f7674e28f1ef29a250ea0b6e


# vim /etc/sysctl.conf
# 共有メモリの最大サイズ。サーバーの搭載メモリ(1GB)に合わせて変更
kernel.shmmax      = 1073741824
while true; do sleep 3; curl -o /dev/null -sw %{time_total}\\n ;done
while true; do sleep 3; curl --head -Ss | head -n 1 ;done
View test.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>iOS9 And iPhone6Plus fixed element displayed tab bar is click event not working</title>
.fixed {
position: fixed;
View sample.html
<!DOCTYPE html>
<html lang="ja">
<meta charset="UTF-8">
<title>iOS9 fixed element delay bug?</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
<p>scroll pages!!</p>
<div class="sample_element" style="position: fixed;top: 30px;">this is fixed</div>
<div class="sample_element" style="position: absolute;color: #333; top: 250px;">this is absolute</div>
View gist:d7634e9792b802825a77

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.