Skip to content

Instantly share code, notes, and snippets.

View yoko's full-sized avatar
🍐
I like pear

yksk yoko

🍐
I like pear
View GitHub Profile
@rummelonp
rummelonp / 0-oppai.md
Created February 29, 2012 03:14
いかにしておっぱい画像をダウンロードするか〜2012 for Ruby
@poochin
poochin / gist:1619121
Created January 16, 2012 04:49
tumblr life 1.0.0pre8 に標準以外のチャンネルに reblog する機能を追加するパッチ
diff -Naru 1.0_0/script.js 1.0_0p/script.js
--- 1.0_0/script.js 2012-01-16 13:42:39.771423716 +0900
+++ 1.0_0p/script.js 2012-01-16 13:47:48.915422946 +0900
@@ -12,6 +12,14 @@
(function(w, content_window, d) { 'use strict';
+var channels = (function(objs) {
+ var names = [];
+ for (var i = 1; i < objs.length; ++i) {
@hail2u
hail2u / csslint-rules.md
Last active April 29, 2023 14:59
CSSLintのRulesの超訳

訳注

これは超訳です。

CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!

この訳はCSSLintと同じライセンスで提供されます。

Possible Errors

@norio
norio / gist:1168521
Created August 24, 2011 16:51
SCSS変更→CSS生成→LiveReloadでCSS反映自動化
# Chromeの最新Dev版にLiveReloadをインストール
# Chromeの拡張機能管理画面でLiveReloadの「ファイルの URL へのアクセスを許可する」にチェックを入れておく
# ターミナルでguard関係のセットアップ
$ gem install rb-fsevent
$ gem install em-websocket
$ gem install guard
$ gem install guard-livereload
$ gem install guard-sass
@aerith
aerith / access_token.pl
Created August 17, 2011 05:55
instagr.am の API を利用するためのアクセストークンを取得して表示するスクリプト。JSON そのまま出力してるだけ。
#!/usr/bin/perl
use strict;
use warnings;
use Config::Pit;
use URI;
use URI::QueryParam;
use URI::Escape;
use LWP::UserAgent;
@ChristianPeters
ChristianPeters / css_splitter.rake
Created August 8, 2011 10:22
Split CSS files so that there are no more than a given number of selectors in one style sheet. This is a tool to cope with Internet Explorer's limitation of max. 4095 selectors per stylesheet.
require 'rake'
require 'css_splitter'
desc 'split css files'
namespace :css do
task :split do
infile = ENV['infile'] || raise("missing infile")
outdir = ENV['outdir'] || File.dirname(infile)
max_selectors = ENV['max_selectors'] || 4095
@db
db / jquery.ajax.progress.js
Created May 11, 2011 12:43
add XHR2 progress events to jQuery.ajax
(function addXhrProgressEvent($) {
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
progress: function() { console.log("standard progress callback"); },
xhr: function() {
var req = originalXhr(), that = this;
if (req) {
if (typeof req.addEventListener == "function") {
req.addEventListener("progress", function(evt) {
that.progress(evt);
(function(w,l){
//return;
var excludes = ['google.com'].join('|');
var trusted = ['dragonfly.opera.com','bit.ly','delicious.com','www.google.co.jp','gyazo.com','delicious.com','google.com','lingr.com','www.w3.org','ashula.info','fastladder.com','www.opera.com','opera-users.jp','puchi.co','oflo.in','ofton.in','opera-wiki.com','localhost','browser-festa.jp'
].join('|');
if ( !l.protocol.match(/http/)
|| ( w.parent !== w )
|| ( l.hostname.match(new RegExp('(' + excludes + ')$' )))
|| ( l.hostname.match(new RegExp('(' + trusted + ')$' )))
){
@s-aska
s-aska / app.psgi
Created February 18, 2011 09:11
Markdown Reader
use strict;
use Data::Section::Simple;
use Encode;
use JSON;
use Path::Class;
use Plack::Builder;
use Plack::Request;
use Text::Markdown;
use Text::Xslate;
@azu
azu / dispatcher.js
Created December 19, 2010 14:50 — forked from yoko/dispatcher.js
dispatcher.js
var dispatcher = {
location: window.location,
stash : [],
connect: function(paths, action) {
if (paths || paths === 0) {
paths = paths.valueOf();
if (!(typeof paths == 'object' && !(paths instanceof RegExp))) // webkit: typeof RegExp == 'function'
paths = { pathname: paths };
dispatcher.stash.push([paths, action]);