Skip to content

Instantly share code, notes, and snippets.

@inao
inao / markdown2inao.pl
Last active October 2, 2015 19:19 — forked from suzuki/markdown2inao.pl
GitHubに移行しました。 https://github.com/naoya/md2inao.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
use Encode;
@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created June 3, 2012 19:30
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
@tagawa
tagawa / sessionStorage.js
Created June 6, 2012 06:31
sessionStorage polyfill
/*
* Based on: http://www.quirksmode.org/js/cookies.html
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js
* and https://gist.github.com/350433
* License: http://www.opensource.org/licenses/MIT
*/
(function(window) {
'use strict';
window.sessionStorage = window.sessionStorage || {
@teppeis
teppeis / tenkaichi-git.md
Last active April 29, 2023 14:58
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@SlexAxton
SlexAxton / .zshrc
Last active March 24, 2025 17:35
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@geckotang
geckotang / bemtaro.md
Last active August 29, 2015 14:07
BEMだらけの桃太郎

BEMだらけの桃太郎

むかしむかし、あるところに、.parent-father + .parent-motherが住んでいました。
.parent-father--goes-mountain.parent-mother--does-washing
.parent-mother--is-doing-washingしていると、ドンブラコ、ドンブラコと、.peach--hugeが流れてきました。
「おや、これは.souvenir--niceになるわ」
.parent-mother.peach--hugeをひろいあげて、家に持ち帰りました。
そして、.parent-father + .parent-fatherが桃を食べようと.peach--has-cut、なんと中から.child-boy--is-energeticが飛び出してきました。
「これはきっと、#godがくださったにちがいない」
子どものいなかった.parent-father + .parent-motherは、大喜びです。