Skip to content

Instantly share code, notes, and snippets.

View suchi's full-sized avatar
👨‍💼

suchi suchi

👨‍💼
View GitHub Profile
// ==UserScript==
// @name Cybozu Holiday Wordwarp
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Enablle holidy wordwrap
// @author suchi
// @match
// @grant none
// ==/UserScript==
#!/usr/bin/env ruby
file = File.open("index.html", "r:iso-2022-jp:UTF-8")
content = file.read
all_html = <<HTML
<html>
<head>
<meta http-requiv="Content-Type" content="text/html;charset=utf-8">
<meta name="Author" content="Aoki Minero">
@suchi
suchi / amazon-calc.js
Created January 4, 2019 01:47 — forked from koyopro/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
@suchi
suchi / martinbaker.rb
Last active June 28, 2022 04:55
calling URI.open via Kernel#open is deprecated, call URI.open directly
# coding: utf-8
# martin bakerから助かった人の数を取得する
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'date'
html = Nokogiri::HTML(URI.open('https://www.martin-baker.com/'))
count = html.search('h1>span')[0].text.to_i
date = Date.today.strftime("%Y/%m/%d")
@suchi
suchi / config.sys
Created May 30, 2015 09:04
config.sys(1992)
files=30
buffers=20
shell=a:\command.com a:\ /p /e:1024
device=a:\os\sys\cinit.sys -kt
lastdrive=1 Normal
device=a:\os\utl\hsb.exe Q V Y-
device=a:\win30\himem.sys
device=a:\os\sys\emm4j.sys /NN
device=a:\win30\ramdisk.sys 1024 512
device=a:\win30\smartdrv.sys 2048 256
@suchi
suchi / autoexec.bat
Created May 30, 2015 09:04
autoexec.bat(1992)
echo off
echo $Header: RCS/autoexec.bat 2.25 92/04/05 21:45:04 suchi Exp $
verify on
a:\os\utl\fcolor w
a:\os\utl\funkey -f a:\os\help\funkey.def
a:\os\utl\now
a:\os\utl\ee /r a:\os\help\env.dat
if exist $$INIT1 goto normal
if exist $$INIT2 goto window
if exist $$INIT3 goto sel
@suchi
suchi / hanakotoba.txt
Last active September 26, 2020 02:36
uniqの花言葉は「君だけを」 〜 素敵なプログラム花言葉たち(1991/9/19)
Note 103 Junk & Test (junk.test)
[ BASENOTE with 36Res ]
Title:Test/kanbai: undel の花言葉は「もう一度やり直そう」
Bytes: 42 Date : 11:02am 9/19/91 Author:pcs29450 (kanbai-an)
undel の花言葉は「もう一度やり直そう」
@suchi
suchi / xshuffle.rb
Created December 12, 2014 06:31
プレゼント交換のペアを決める #hmrb
class Array
def xshuffle
a = (0...size).to_a
a.shuffle!
ret = Array.new(size)
(0...size).each do |ii|
ret[a[ii]] = self[a[(ii + 1) % size]]
end
ret
end
@suchi
suchi / 0_reuse_code.js
Created March 20, 2014 11:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console