Skip to content

Instantly share code, notes, and snippets.

View sharapeco's full-sized avatar
💭
Tengo hambre

Shinichiro Yabu sharapeco

💭
Tengo hambre
View GitHub Profile
@sharapeco
sharapeco / jshint.l
Created December 4, 2013 06:03
xyzzy で JSHint
(defun jshint (&optional (filename (get-buffer-file-name)))
"jscript-mode: このファイルの文法チェック"
(interactive)
(let (command
(bufname "*JSHint*")
(noerror-message "No errors detected")
buf
line
col
(error-message nil))
@sharapeco
sharapeco / yutori-kana-mac.php
Last active December 28, 2015 16:18
かな入力用ゆとり辞書を作る
<?php
$ret = main();
exit($ret);
// https://code.google.com/p/mecab/ から
// mecab-jumandic-7.0-20130310.tar.gz をダウンロード
// 展開してできる ContentW.csv を使わせてもらう
//
// ああ,1430,1430,8661,感動詞,*,*,*,ああ,ああ,代表表記:ああ/ああ
// 愛,1133,1133,5256,名詞,普通名詞,*,*,愛,あい,代表表記:愛/あい 漢字読み:音 カテゴリ:抽象物
@sharapeco
sharapeco / markdown-misc.l
Last active December 27, 2015 23:29
xyzzy で Markdown を書くための設定
;;; -*- Mode: Lisp; Package: EDITOR -*-
;;;
;;; This file is not part of xyzzy.
;;;
;;; Markdown を HTML に変換したりする
;;;
;;; 改変 markdown-mode for #xyzzy (色付け & メジャーモード化) が必要
;;; https://gist.github.com/youz/1339252
(provide "markdown-mode")
@sharapeco
sharapeco / kill-google-maps-miles-feet.css
Created October 29, 2013 00:53
Google マップから目障りなマイル/フィート表示を消すスタイルシート
div[jsselect="scale:scalecontrol.scales"]
{ text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff; }
div[jsselect="scale:scalecontrol.scales"][jsinstance^="*"],
div[jsselect="bar:scalecontrol.bars"][jsinstance^="*"]
{ display: none; }
@sharapeco
sharapeco / make-mp3-oga.sh
Created October 20, 2013 11:39
オーディオファイルをMP3とOggに変換して作業ディレクトリに放り込む
#!/bin/sh
FFMPEG="/usr/local/bin/ffmpeg"
if [ $# -ne 1 ]; then
echo "From AIFF to MP3 and Ogg" 1>&2
echo "usage: ./conv.sh <aiff>" 1>&2
exit 1
fi
@sharapeco
sharapeco / qrcode.js
Created October 18, 2013 01:33
現在表示しているページのURLをQRコードで表示するブックマークレット。 http://blog.self.li/post/16366939413/how-to-convert-bookmarklet-to-chrome-extension ここから Opera/Chrome 用の拡張機能を作れる。
var d = document
, container = d.body
, div = d.createElement("div")
, divStyle = div.style
, img = d.createElement("img")
, styles = {
position: "fixed"
, left: "20px"
, top: "20px"
, zIndex: "9999"
@sharapeco
sharapeco / SQL
Created September 17, 2013 05:09
[xyzzy] SQL-mode キーワードファイル
; 逸見さんご提供
ABORT
action
admin
after
aggregate
alias
all
allocate
alter
@sharapeco
sharapeco / components.less
Created May 27, 2013 02:10
オレオレBootstrap
//////////////////////////////////////////////////////////////////
// Components
@keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
@sharapeco
sharapeco / NormalizeString.vba
Created May 21, 2013 06:08
半角カナを全角に、全角英数字を半角にだいたい変換する関数 Excel 用
Private Function NormalizeString(ByVal source As Variant) As Variant
Dim i As Integer
Dim c As Variant
Dim result As Variant
result = ""
For i = 1 To Len(source)
c = StrConv(source, vbWide)
If Mid(c, i, 1) Like "[A-z]" Or Mid(c, i, 1) Like "[0-9]" Or Mid(c, i, 1) Like "-" Then
@sharapeco
sharapeco / facebox.css
Created May 20, 2013 01:38
[あとでFork] Facebox私家版。CSS3で軽量化。 http://defunkt.io/facebox/
#facebox {
position: absolute;
top: 0;
left: 0;
z-index: 100;
text-align: left;
background: #878787;
background: rgba(82, 82, 82, 0.7);
border-radius: 8px;
-webkit-border-radius: 8px;