Skip to content

Instantly share code, notes, and snippets.

💭
Tengo hambre

sempre harapeco sharapeco

💭
Tengo hambre
Block or report user

Report or block sharapeco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sharapeco
sharapeco / diff-selected-buffers.l
Created Dec 19, 2012
[xyzzy] いま開いているバッファを diff する。ウィンドウを二つ開いておくこと。
View diff-selected-buffers.l
(defun diff-selected-buffers ()
(interactive)
(let (file1 file2)
(setq file1 (get-buffer-file-name (selected-buffer)))
(other-window)
(setq file2 (get-buffer-file-name (selected-buffer)))
(diff file1 file2)))
@sharapeco
sharapeco / typesquarefix.js
Created Jan 16, 2013
モリサワ TypeSquare が @font-face ルールを作成するときに、ウェイト情報が含まれないので、そこをいいがにする (Firefox のみ有効)
View typesquarefix.js
(function() {
var fl = document.styleSheets.length
, timer = setInterval(watch, 100)
;
function watch() {
if (fl === document.styleSheets.length) return;
clearInterval(timer);
iiganisuru();
}
@sharapeco
sharapeco / IshikawaAirPollutionAPI.rb
Last active Dec 14, 2015
石川県の大気環境の状況を取得。作りかけ。 取得元 http://www.pref.ishikawa.jp/cgi-bin/taiki/top.pl / プロジェクト継続先 https://github.com/kitak/ishikawa_air_pollution
View IshikawaAirPollutionAPI.rb
require 'rubygems'
require 'mechanize'
class IshikawaAirPollutionAPI
def initialize()
@use_sleep = false
@agent = Mechanize.new
@agent.user_agent_alias = 'Mac Safari'
@sharapeco
sharapeco / yahoo_japan_mail.user.css
Last active Dec 15, 2015
Yahooメール(ベータ版)を広々と使うためのユーザスタイルシート。Stylish などのアドオンをインストールして使います。2013-04-01 更新
View yahoo_japan_mail.user.css
#theAd,
.ad_NW,
.col-b,
[id*="ads_"],
[class*="ads_"] { display: none !important; }
/*
#main,
.nav-bar,
#shellcontent { margin-top: -100px; }
@sharapeco
sharapeco / Makefile
Last active Dec 15, 2015
Excel から出力した UTF-16LE のタブ区切りテキストを UTF-8 の CSV ファイルにするスクリプト、と、それをさらに JSON にするスクリプトと Makefile
View Makefile
SRC_DIR = src
TMP_DIR = utf8
DEST_DIR = json
CSVS = $(wildcard $(addsuffix /*.csv,$(SRC_DIR)))
JSONS = $(subst $(SRC_DIR)/,$(DEST_DIR)/,$(CSVS:.csv=.json))
.PHONY: all
all: $(JSONS)
View .xyzzy
(require "ni/setup")
(ni-autoload)
;; diff
(setq ed::*diff-command-name*
(map-slash-to-backslash (merge-pathnames "~xyzzy/bin/diff.exe" (user-homedir-pathname))))
(defun diff-selected-buffers ()
(interactive)
(let (file1 file2)
@sharapeco
sharapeco / .htaccess
Last active Dec 17, 2015
某ミーショップ在庫更新API。あらかじめ書き込み可能なディレクトリ data を作っておいてください。
View .htaccess
# Web API として使うためのファイル (1)
# Web サーバ上の適当なディレクトリに置いて使う。
# mod_rewrite が必要
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.rb?url=$1 [QSA,L]
@sharapeco
sharapeco / facebox.css
Created May 20, 2013
[あとでFork] Facebox私家版。CSS3で軽量化。 http://defunkt.io/facebox/
View facebox.css
#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;
@sharapeco
sharapeco / NormalizeString.vba
Created May 21, 2013
半角カナを全角に、全角英数字を半角にだいたい変換する関数 Excel 用
View NormalizeString.vba
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 / components.less
Created May 27, 2013
オレオレBootstrap
View components.less
//////////////////////////////////////////////////////////////////
// Components
@keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
You can’t perform that action at this time.