Skip to content

Instantly share code, notes, and snippets.

@fukamachi
fukamachi / g.hatena.ne.jp.js
Last active December 20, 2015 16:38
はてなグループで本文のはてな記法をコピーするdotjs
$(function() {
$('.section h3').each(function() {
var entry = $(this);
var permalink = entry.find('a').first().attr('href');
$.get(permalink + '?mode=json').success(function(data) {
var button = $('<button>').text('コピー');
button.on('click', function() {
window.prompt("Copy to clipboard: Ctrl+C, Enter", data['body']);
@onishi
onishi / wget.pl
Created November 14, 2012 09:30
HTMLまるごと保存
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use DateTime;
use Digest::SHA1 qw(sha1_hex);
use Encode;
use File::Path qw/make_path/;
use HTML::Parser;
@yuroyoro
yuroyoro / git-back
Created August 5, 2011 11:11
git back でひとつ前に居たbranchに戻る
#!/bin/sh
# usage:
# git back でひとつ前に居たbranchに戻る
# git back N でN個前に戻る
# git back --listで履歴だす
#
# /usr/local/libexec/git-coreに置いてchmod +xしとけ
CNT=1