Skip to content

Instantly share code, notes, and snippets.

@hail2u
hail2u / transparent.png
Created July 11, 2014 10:58
サーモンピンクのチェック模様のPNG画像をData URIにしたもの
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAQHRrUGdUa1BORyAgQ29weVJpZ2h0IFRha2kgQWxsIFJpZ2h0IFJlc2VydmVkAI0AAA0AAABSREhJmDlXAOa9SQCQkWg2mDWMHgAAAB5JREFUKM9j+H9jL3aEAzCMaqCNBlwAh0GjGmiiAQBn/cifTDaT1wAAAABJRU5ErkJggg==
@hail2u
hail2u / next-update.log
Created July 6, 2014 20:43
依存パッケージのバージョンを一時的に上げてテストが通るかチェックしてくれるnext-updateのログ。便利そう。
$ next-update --latest
next-update - Tests if module's dependencies can be updated to latest version
version: 0.4.5
author: {"name":"Gleb Bahmutov","email":"[email protected]"}
checking if the current state works
npm test
current state works
module's current dependencies:
package available
-------- ---------
@hail2u
hail2u / update-gh-pages.md
Created July 4, 2014 17:30
masterから全ファイルぶっこ抜いてgh-pagesに持っていき、必要な物だけ残そうとする試み

あらかじめ手作業でgh-pages内のファイル構成は整えておく。

# ビルドします
node index.js
# コミットします
git commit --all --message="Rebuild"
# gh-pagesに移動します
git checkout gh-pages
# masterのファイルを全部持ってくる
@hail2u
hail2u / git-wip.sh
Created June 20, 2014 07:47
Back to master, create wip branch, commit empty, push and then open GitHub repostiory page.
#!/bin/sh
# Dependencies
# gh-open: https://github.com/typester/gh-open
BRANCH=$1
git checkout master &&
git checkout -b $BRANCH &&
git commit --allow-empty -m "WIP $BRANCH" &&
@hail2u
hail2u / escape-url.patch
Created June 19, 2014 01:37
Escape `$url` before processing `head.flavour`
diff --git blosxom.cgi blosxom.cgi
index 8ffe7ae..0fb7041 100755
--- blosxom.cgi
+++ blosxom.cgi
@@ -764,6 +764,30 @@ sub generate {
}
}
+ # Save unescaped versions and allow them to be used in flavour
+ # templates.
@hail2u
hail2u / filelist.md
Last active April 19, 2017 01:08
Git for Windowsにrsyncを混ぜるのに必要なファイル一覧とそのDL先
@hail2u
hail2u / prettify-loader.js
Created June 10, 2014 12:59
Prettifyローダー
/**
* @preserve prettify-loader.js
*
* LICENSE: http://hail2u.mit-license.org/2011
*/
(function (d) {
if (d.querySelectorAll) {
var languages = ['bash', 'bsh', 'c', 'cc', 'coffee', 'cpp', 'cs', 'csh',
'cxx', 'cyc', 'cv', 'htm', 'html', 'java', 'javascript', 'js', 'json',
'm', 'mxml', 'perl', 'pl', 'pm', 'py', 'python', 'rb', 'rc', 'rs', 'ruby',
@hail2u
hail2u / jsonlint.vim
Created June 7, 2014 06:47
Vim compiler pugin for JSON Lint
if exists('current_compiler')
finish
endif
let current_compiler = 'jsonlint'
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
@hail2u
hail2u / structure.md
Created June 1, 2014 17:12
Directory Structure of Hail2u.net
  • .bin/ ... 色々なユーティリティ
  • .grunt/ ... Gruntでゴニョゴニョするものは全部ココ
    • task/ ... カスタム・プラグイン
      • blosxom.js ... Blosxomを叩く
      • generate.js ... Handlebars.jsを使ったHTMLジェネレーター
      • generate_sitemap.js ... sitemap.xml専用
      • gitcommit.js ... コミットします、プッシュもできる
      • upload.js ... scpでアップロード
    • html/ ... generate.jsでプロセスする*.mustacheがまとめられてる
  • css/ ... Sassで書いたものはココ、Bowerもここだけで管理
@hail2u
hail2u / Gruntfile.js
Last active August 29, 2015 14:02
Gruntのバグ?
/* jshint node: true */
'use strict';
var path = require('path');
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
upload: {