Skip to content

Instantly share code, notes, and snippets.

View hokaccha's full-sized avatar

Kazuhito Hokamura hokaccha

View GitHub Profile
���{��
atom.commands.add 'atom-workspace', 'custom:set-cp932', ->
atom.workspace.getActiveTextEditor().setEncoding('cp932')
require "nokogiri"
require "open-uri"
url = "https://blog.jxck.io/entries/2016-01-28/html-compression.html"
doc = Nokogiri::HTML(open(url))
doc.css('title').each do |title|
puts title.content
#=> HTML の省略によるサイズ最適化 | blog.jxck.io
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hokaccha
hokaccha / jquery.smarthistory.js
Created February 23, 2011 07:56
Page transition jQuery plugin, useing history.pushState.
/*
* jquery.smarthistory.js
*
* Copyright (c) 2010 Kazuhito Hokamura
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* @author Kazuhito Hokamura (http://webtech-walker.com/)
* @version 0.0.1
*
var co = require('co');
var fs = require('fs');
co(function* () {
var a = yield fs.readFile.bind(fs, 'a.txt', 'utf8');
var b = yield fs.readFile.bind(fs, a.trim(), 'utf8');
var c = yield fs.readFile.bind(fs, b.trim(), 'utf8');
console.log(c.trim());
})();

ジョジョの奇妙な冒険 Advent Calendar 2013 2日目。

特にネタがないので今年買ったジョジョ関連のものの感想などをだらだらと書こう。

書けばよかろうなのだァァッ!

はい。

ジョジョの奇妙な冒険 オールスターバトル

# usage:
# $ mobile-safari 7.0 http://example.com/
function mobile-safari() {
VERSION=$1
URL=$2
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$1.sdk/Applications/MobileSafari.app/MobileSafari -u $2
}