This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun anything-kill-buffers () | |
"Preconfigured `anything' to kill buffer you selected." | |
(interactive) | |
(anything | |
'(((name . "Kill Buffers") | |
(candidates . anything-c-buffer-list+) | |
(action | |
("Kill Buffer" . (lambda (candidate) | |
(kill-buffer candidate) | |
(anything-kill-buffers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'puyo' | |
include Puyo | |
include Util | |
tbl = Hash.new(0) | |
100.times do | |
ta = ([1,2,3,4]*128).shuffle*3 | |
f = Field.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pixiv big image restraint | |
// @namespace whiteleaf | |
// @include http://www.pixiv.net/member_illust.php?mode=big* | |
// ==/UserScript== | |
(function() { | |
var padding = 18; | |
var imgs = document.getElementsByTagName("img"); | |
if (imgs.length != 1) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "dl/import" | |
require "dxruby" | |
module WinAPI | |
module User32 | |
SWP_NOSIZE = 1 | |
SM_CXFULLSCREEN = 0 | |
SM_CYFULLSCREEN = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Simple Ini file controller | |
// | |
// [ ] で囲まれたものはセクションとして扱われ、それ以降のデータはセクションに所属する | |
// セクションが登場するまでのデータは global というセクションに割り当てられる | |
// | |
// var ini = new Ini("setting.ini"); | |
// value1 = ini.data.global.key; | |
// value2 = ini.data.section.key; | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "open3" | |
ARGV.each do |fname| | |
basename = File.basename(fname, ".epub") | |
command = "./kindlegen \"#{fname}\"" | |
res = Open3.capture3(command) | |
puts res[0].force_encoding(Encoding::UTF_8).encode(Encoding::Windows_31J), res[1] | |
command = "python kindlestrip.py \"#{basename}.mobi\" \"#{basename}.mobi\"" | |
res = Open3.capture3(command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Encoding: Windows-31J -*- | |
# | |
# Copyright 2013 whiteleaf. All rights reserved. | |
# | |
require "stringio" | |
class Converter00 | |
def convert(io, setting) | |
data = io.read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Encoding: Windows-31J -*- | |
# | |
# Copyright 2013 whiteleaf. All rights reserved. | |
# | |
require "stringio" | |
require_relative "progressbar" | |
class BasicConverter | |
def initialize(io, setting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Encoding: Windows-31J -*- | |
require "stringio" | |
class Converter < BasicConverter | |
def before_convert(io) | |
data = io.read | |
data.gsub!("\n\n", "\n") | |
StringIO.new(data) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Encoding: UTF-8 -*- | |
# | |
# 対象小説情報 | |
# タイトル: 無職転生 - 異世界行ったら本気だす - | |
# 作者: 理不尽な孫の手 | |
# URL: http://ncode.syosetu.com/n9669bk/ | |
# | |
converter "無職転生 - 異世界行ったら本気だす -" do | |
def before(io, type) |
OlderNewer