Skip to content

Instantly share code, notes, and snippets.

@eban
eban / tenki-jp-feed.js
Last active March 23, 2019 23:49
Feed generator for tenki.jp
module['exports'] = function Tenkijp(hook) {
var md5 = require("md5");
if (md5(hook.params.magic) != "0f20e92d496b9b9a2ce77c0c5b0c24b9") {
console.log("md5 error", hook.req.headers['user-agent'], hook.req.headers['x-forwarded-for'], hook.params.magic);
return;
}
var cheerio = require("cheerio");
var req = require("request");
var rss = require("rss");
var url = hook.params.url || "http://www.tenki.jp/amedas/3/14/43241.html";
#! /usr/bin/ruby
# -*- coding: utf-8 -*-
require 'win32ole'
olFolderCalendar = 9
WIN32OLE.codepage = WIN32OLE::CP_UTF8
ol =
begin
WIN32OLE.connect("Outlook.Application")
#!/bin/bash
STAR=$' \u2605'
FSLASH=$'\uFF0F'
BSLASH=$'\uFF3C'
ORNAMENTS=(0069 0020 0020 0020 0020 0020
0020 0020 0020 0020 0020 0020
0020 2E1B 2042 2E2E 0026 0040 FF61)
ORNAMENT_COLORS=(21 33 34 35 36 37)
HAT='^'
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
STAR = " \u2605"
FSLASH = "\uFF0F"
BSLASH = "\uFF3C"
ORNAMENTS = %W(\u0069 \u0020 \u0020 \u0020 \u0020 \u0020
\u0020 \u0020 \u0020 \u0020 \u0020 \u0020
\u0020 \u2E1B \u2042 \u2E2E \u0026 \u0040 \uFF61)
ORNAMENT_COLORS = [ 21, 33, 34, 35, 36, 37 ]
@eban
eban / Makefile
Last active December 14, 2015 02:09
Makefile で、HTTP のステータスコードをすばやくしらべる
#! /usr/bin/make -f
# Required GNU maek
# % make 4
# % make 40
# % make 404
# % make Bad
all: 1 2 3 4 5
%:; @sed -n '/$@/s/#//p' Makefile
#100 Continue
#101 Switching Protocols
@eban
eban / gti.rb
Created August 16, 2012 09:41
gti.rb
def move_to_top
print "\e[7A"
end
def line_at start_x, s
print " " * start_x if start_x > 0
puts s[[-start_x, 0].max, TERM_WIDTH - start_x]
end
@eban
eban / zakkicho.feed43.txt
Created February 26, 2012 15:51
ときどきの雑記帖のfeed43 Item (repeatable) Search Pattern
<div class="entry" name="D{*}" id="D{*}">{|}
<h4><a href="{%}"{|}
{_}>{%}</a>{*}</h4>{|}
{%}{|}
</div>
@eban
eban / gist:1094790
Created July 20, 2011 11:29
boron % cd /home; du -sh *
20G akr
13G wiki
3.6G kazuhiko
2.0G matz
1014M okkez
643M nobu
523M tamura
353M shugo
253M kazu
237M ko1
@eban
eban / mingw-build.log
Created May 15, 2011 16:11
mingw build log on Ubuntu 11.04
% ./configure --host=i586-mingw32msvc --target=i386-mingw32 --build=i386-linux
checking build system type... i386-pc-linux-gnu
checking host system type... i586-pc-mingw32msvc
checking target system type... i386-pc-mingw32
checking for i586-mingw32msvc-gcc... i586-mingw32msvc-gcc
checking for i586-mingw32msvc-gcc... (cached) i586-mingw32msvc-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
@eban
eban / .vimrc
Created May 14, 2011 07:18
dot files
"scriptnames
set nocp
set completeopt=
set viminfo='100,\"500,h,%
set fileencodings=iso-2022-jp,ucs-bom,utf-8,euc-jp,default
set incsearch
set notitle
set ambiwidth=double
set nf=alpha,hex
set clipboard=unnamed