Skip to content

Instantly share code, notes, and snippets.

View laiso's full-sized avatar
☀️

laiso laiso

☀️
View GitHub Profile
package Plagger::Plugin::Subscription::Bookmarks::Konqueror;
use strict;
use base qw( Plagger::Plugin::Subscription::Bookmarks );
use XML::XBEL;
sub load {
my($self, $context) = @_;
my $xbel = XML::XBEL->new;
@laiso
laiso / gist:123644
Created June 4, 2009 14:14
wassr_follow_spam.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
import re
import urllib, urllib2
from lxml import etree
import simplejson
class WassrError(Exception):
@laiso
laiso / macports_x11_rxvt-unicode_Portsfile
Created July 28, 2009 08:14
Because it was not possible to install it, it edited it a little.
# $Id: Portfile 45603 2009-01-18 20:52:41Z jeremyhu@macports.org $
####################################################################
# Marc Lehmann, the developer of rxvt-unicode, has no interest in #
# supporting it on Mac OS X. He is hostile about Apple, Mac OS X, #
# and Mac users, so do not contact him about his software when #
# used on Mac OS X. If you encounter problems updating this port #
# to a newer version, find a workaround and write a patch. Do not #
# report upstream. See http://trac.macports.org/ticket/17202 #
####################################################################
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
source ~/.profile
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11/lib/X11/xinit/.Xmodmap
# merge in defaults and keymaps
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urlparse
import urllib2
from pit import Pit
try:
import json
except ImportError:
@laiso
laiso / python.vim
Created August 26, 2009 03:42
~/.vim/after/ftplugin/python.vim
function PyLint()
let rslt = system('pychecker --keepgoing '.bufname(''))
if strlen(matchstr(rslt, 'Error:'))
echo rslt
endif
endfunction
au BufWritePost *.py :call PyLint()
diff --git a/Classes/WebViewController.m b/Classes/WebViewController.m
index b7228e2..e54e029 100644
--- a/Classes/WebViewController.m
+++ b/Classes/WebViewController.m
@@ -42,16 +42,15 @@ static NSObject *webViewcreateWebViewWithRequestIMP(id self, SEL _cmd, NSObject*
- (void)_loadPageInfo {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSURL *webServiceURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://b.hatena.ne.jp/entry/json/%@", pageURL]];
+ NSURL *webServiceURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://b.hatena.ne.jp/entry/jsonlite/%@", pageURL]];
diff --git a/Classes/HatenaAtomPub.m b/Classes/HatenaAtomPub.m
index bd7ee47..9d1787d 100644
--- a/Classes/HatenaAtomPub.m
+++ b/Classes/HatenaAtomPub.m
@@ -340,12 +340,9 @@
}
- (NSData *)requestMyBookmarkFeed:(NSInteger)offset {
- HatenaTouchAppDelegate *hatenaTouchApp = [HatenaTouchAppDelegate sharedHatenaTouchApp];
- UserSettings *userSettings = hatenaTouchApp.userSettings;
@laiso
laiso / .vimrc
Created September 1, 2009 09:04
if filereadable( $HOME . "/.vimrc.before" )
source ~/.vimrc.before
endif
"" 256colors
"set t_Co=256
if &t_Co == 256
colorscheme xoria256
endif
@laiso
laiso / .emacs
Created September 1, 2009 09:20
;;; arch
;; .emacs で OS の判定を関数化しよう - msshの日記 http://d.hatena.ne.jp/mssh/20081208/1228742294
(defvar os-type nil)
(cond ((string-match "apple-darwin" system-configuration) ;; Mac
(setq os-type 'mac))
((string-match "linux" system-configuration) ;; Linux
(setq os-type 'linux))
((string-match "freebsd" system-configuration) ;; FreeBSD
(setq os-type 'bsd))