Skip to content

Instantly share code, notes, and snippets.

View japboy's full-sized avatar
🏠
WFH

Yu Inao japboy

🏠
WFH
View GitHub Profile
@japboy
japboy / socials.js
Last active December 17, 2015 14:29
SNS ボタン JavaScript コードまとめ。
/**
* Social button BFFs (modified)
*
* http://www.phpied.com/social-button-bffs/
* http://t32k.me/mol/log/social-button-bffs/
* http://www.aaronpeters.nl/blog/why-loading-third-party-scripts-async-is-not-good-enough
*
* Load this script before `</body>` like:
*
* <script src="./socials.js"></script>
@japboy
japboy / annoying-social-buttons.md
Last active January 29, 2016 10:32
ソーシャルボタンのスバラシサについてまとめてみた (嘘

みんなだいすきそーしゃるぼたん

今日は以下の記事よりソーシャルボタンのスクリプト読み込み最適化についてメモしておきたいと思います。

Delay-load non-essential scripts (e.g., Facebook Like, Google +1, Twitter).

Everyone wants their page to be popular on social networks, but social network scripts tend to be large and can cause sluggish response for the user. Waiting until the page has loaded before requesting these scripts can make the page responsive sooner. Even better, rethink whether these buttons are necessary at all, and whether they improve your page's overall experience.

Frontrend 05

Flash Toolkit for CreateJS

  • @tomowaqs

Functional JavaScript with Lo-Dash.js

Web サイト制作におけるパターンの考察

フロントエンド JavaScript によるサイト作成の受難。最強の grunt タスクをつくるためのメモとして。とりあえず思いつくところまで。

パターン

'use strict'
#
# Timer manager
#
# Usage:
#
# TimerManager.setInterval fn, 1000
# TimerManager.setTimeout fn, 1000
#
'use strict'
#
# Line oriented process
#
# Based on:
# http://paulownia.hatenablog.com/entry/2012/09/29/024439
#
# Usage:
#

rbenv に学ぶ PHP/Python/Ruby/Node.js のバージョン管理 (WIP)

ついに重い腰をあげて、軽量プログラミング言語のバージョン管理はじめました。Perl? そんなものは知りません。

バージョン管理?

バージョン管理の必要性

#!/bin/sh
# Update a specific branch to include content from specific directory
BRANCH='gh-pages'
DIRECTORY='gh-pages'
BRANCH_SHA=$(git show-ref -s refs/heads/${BRANCH})
DIRECTORY_SHA=$(git ls-tree -d HEAD ${DIRECTORY} | awk '{print $3}')
COMMIT=$(echo 'Auto-update.' | git commit-tree ${DIRECTORY_SHA} -p ${BRANCH_SHA})
git update-ref refs/heads/${BRANCH} ${COMMIT}

Loose-coupling Front and Back Ends FTW

こんにちは。今回は現実逃避を兼ねてフロントエンドとバックエンドにおける疎結合の素晴しさをお伝えしたいと思います。

疎結合とは何か

TODO: 例え話

<!DOCTYPE html>
<meta charset="utf-8">
<title>UML: Sequence diagram</title>
<link href="//jumly.tmtk.net/release/jumly.min.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="//coffeescript.org/extras/coffee-script.js"></script>
<script src="//jumly.tmtk.net/release/jumly.min.js"></script>
<body>
<script type="text/jumly+sequence">