Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name LDR_hide_mark_read
// @namespace http://github.com/monmon
// @description hide mark read.
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
(function () {
var count = 0;
// ==UserScript==
// @name hatena_bookmark_cmptag
// @namespace http://github.com/monmon
// @description 「おすすめタグ」と「キーワード」に自分のタグがあれば目立たせる
// @include http://b.hatena.ne.jp/add*
// @include http://b.hatena.ne.jp/*/edit*
// ==/UserScript==
(function(){
// ==UserScript==
// @name nifty_cilp_rss_search
// @namespace http://github.com/monmon
// @description googleの検索結果に自分のクリップを入れる
// @include http://www.google.co.jp/*
// ==/UserScript==
(function(){
var user = 'monmon'; // 自分のユーザ名
// ==UserScript==
// @name showYouTubeInGoogleSearch
// @namespace http://github.com/monmon
// @description Show YouTube Flash in Google search result
// @include http://www.google.co.jp/search*
// ==/UserScript==
(function() {
var length = 0;
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::UserAgent;
use Socket;
use Data::Dumper;
BEGIN {
*inet_aton = \&Socket::inet_aton;
@monmon
monmon / gist:1267428
Created October 6, 2011 13:45
privateなpropertyを作りたい時は無名カテゴリ(クラスエクステンション)を使う
/**
* Foo.h
*/
@interface Foo
// プロパティを使うのでインスタンス変数は省略する
// ここでは外部から触られても書き込みできないようにreadonlyにする
@property (readonly, retain) NSString *str;
@end
@monmon
monmon / gist:3141604
Created July 19, 2012 08:35
Sparrowで使われているoverlayのmenuサンプルであるMHTabBarController
@monmon
monmon / gist:3748206
Created September 19, 2012 07:35
NGVaryingGridViewでサンプルコード勉強会

使い方

概要

  • TableViewと同じようにgridViewDelegateを実装してcellを作る
    • @required rectsForCellsInGridView:
  • cellの位置情報を含んだCGRectのNSArrayを作り、それを返す
@monmon
monmon / gist:3786266
Created September 26, 2012 05:24
SICP q1.42
; p.39の脚注58より
; x |-> f(g(x))
; は
; (lambda (x) (f (g x)))
(define (compose f g)
(lambda (x) (f (g x))))