The RoLLing cOde

Rumor, crap and –un–original

[Safari Extension] Share to GReader 1.1

with 2 comments

Minor fix:

  • always use HTTPS;
  • fix bug when sharing page with iframes.

Download or install from Apple Safari Extensions.

Written by freewizard

2011-06-26 at 13:54

Posted in Crap

Tagged with ,

Input Methods on Mac OS X

with one comment

Sun Pinyin

Ever since my upgrade to Snow Leopard in 2009, it has long been a pain that input methods freeze my MBP from time to time, usually when there’s high work load like indexing (mds). I filed a bug report (radar 7757239) to Apple, attached all necessary process dumps as asked and even recorded a video to explain the user experience, got back hardly helpful.

So I decided to go after that myself. The first thing I tried is switching to use same Input Source in all document in Text Input Preference, this has some effect but does not help too much. Secondly, a notable difference between 10.5 and 10.6 on text input is a new visual input method switcher when you push and hold Cmd+Space, which is called TISwitcher. Disable it via launchd, everything seems back to normal.

sudo su -
killall TISwitcher
cd /System/Library/LaunchAgents/
defaults write com.apple.tiswitcher.plist Disabled -bool yes
chmod 644 com.apple.tiswitcher.plist

Also for those who are not quite fond of fancy new features in FIT or QIM, here’s SunPinyin 2.0.3 for Mac, my private build for latest update of the simple and handy input method.

Written by freewizard

2011-02-20 at 16:14

Posted in Crap

Tagged with ,

Trip around Bayern

leave a comment »

Made a trip to Germany in the other week, mostly travelled and stayed in München and Köln. Elegancy of architectures and efficiency of travel system impressed me a lot. Churches are gorgeous, though I spent most of my time in museums.

Quite a few Andy Warhol works in München museums, as well as other US artists, that fed me well bc I did miss those.

Also got a glimpse for real 20th Anniversary Mac and many other old models for the first time, sweet. Oh, wait, they don’t have this one in München :)

Even though it might possess smaller collection than moma in ny, Ludwig Museum in Köln is such a well designed and utilized space that you feel just like entering the wonderland of modern arts.

Written by freewizard

2010-11-13 at 22:26

Posted in Crap

Tagged with

Sign IPA with installed Apple developer license

leave a comment »

iOS app

You should have iOS SDK, iPhone/iPad developer certification and provision profile installed on your Mac before trying this script.

Download

Note: Only tested with a few .IPA files myself so far, use it properly at your own risk.

Updated: added support for key chain, moved to Gist.

Written by freewizard

2010-07-28 at 23:00

Posted in Crap

Attack of the Clone of Clone

with one comment

There were two famous funny abbr about Chinese internet industry:
ICP = Internet Copy Paste.
C2C = Copy to China.

Today, we seems to get a new one: TCP = Tencent Copied Perfectly.

Mu Rongjun, a staff at MeiTuan, complained on his twitter about their website being copied pixel-by-pixel by Tencent.

Murj

Following images shows how identical their pages are in both texts and screen shots.

Help page about “how to avoid false spam alert in GMail” on meituan.com:
meituan

Help page about “how to avoid false spam alert in GMail” on tuan.qq.com:
qq tuan

By take a careful stare to the fonts in the two screen shots, you can see the email address in the second shot, which is from Tencent, is definitely handcrafted by image editing not a real screen shot.

The fun part here is: MeiTuan is one of the earliest clones of groupon in China; Tencent, the 3rd largest internet company in the world(by mkt cap), joins the clone war of groupon recently; so it turns out Tencent has just done a clone of clone.

Since China is a Harmonious Society and MeiTuan is just a small startup, I think this story will just end up nowhere. On the other hand, because most people in this society are all comfortable with downloading and consuming digital content for free, there might not be any powerful moral motivation to accuse others for cloning and pirating.

Written by freewizard

2010-07-11 at 00:53

Posted in Crap

FanRadio + AppleScript

with one comment

Check update or Download.

shuffle : shuffle or skip to next song
current track : title of current track → text
current album : title of current album → text
current artist : name of current artist → text

For ppl who ask features like updating Last.fm/MSN/Gtalk/Twitter status, you can now do it yourselves.
Here’s a small piece you can start with, in case you are new to AppleScript.

Want to share the current playing song with your Adium friends? Install Now Playing in Fan Radio.AdiumScripts and type %_fanradio_playing in your status or chat message.

Written by freewizard

2010-07-03 at 12:03

Posted in Crap

FanRadio: Free Music For Mac

with 45 comments

Plays free tracks from Douban Radio

  • Requires Mac OSX Leopard or Snow Leopard
  • Growl integration
  • AppleScript support
  • Global hotkey
  • (v1.1.0) Save login info in OS X Keychain

Screen Shot

Download | 下载

Written by freewizard

2010-06-20 at 21:33

Posted in Crap

Tagged with ,

Safari Extension: Share to Google Reader

with 4 comments

Requires Safari 5.0 or later
Download here

Written by freewizard

2010-06-10 at 03:16

Posted in Crap

Tagged with

WordPress full export script

leave a comment »

Add the script to crontab so that backup scheduled everyday.
Python code follows.

#!/usr/bin/python
import cookielib, urllib2, urllib, sys
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)

def export(url, login, passwd):
	u = "wp-login.php"
	l = {"log":login, "pwd":passwd}
	r = urllib2.Request(url + "wp-login.php", urllib.urlencode(l))
	v = urllib2.urlopen(r).read()
	r = urllib2.Request(url+"wp-admin/export.php?author=all&download=true");
	v = urllib2.urlopen(r).read()
	return v

def main(argv):
	if len(argv)<4:
		sys.stderr.write("Usage: %s http://your.wordpress.com/ user pass\n" % (argv[0]))
	else:
		print export(argv[1], argv[2], argv[3])

if __name__ == "__main__":
    sys.exit(main(sys.argv))

Written by freewizard

2010-04-17 at 17:57

Posted in Crap

AdBlock plugin for OmniWeb

leave a comment »

Current OmniWeb has an ad-block feature, and this plugin makes it possible to automatically update the filter list from EasyList and etc.

Install SIMBL if not yet.

Download, unzip and copy Safari AdBlock.bundle to /Library/Application Support/SIMBL/Plugins/

For OmniWeb 5.x users, run following commands in Terminal to activate Safari AdBlock for OmniWeb:

defaults write -app OmniWeb ABIsEnabled -int 1
defaults write -app OmniWeb ABSubscriptions -array -string en
defaults write -app OmniWeb OWAddressFilteringEnabled -int 1

  • works for Safari & Webkit too
  • no preference UI in OmniWeb, turn on/off by using built-in AdBlock switch of OW
  • built-in ad block of OmniWeb still works, use that as customized block list if you wish
  • only tested on OSX 10.6.3 / OW 5.10.2-r128512, might also be ok for earlier versions though

Source

Written by freewizard

2010-04-05 at 20:49

Posted in Crap

Tagged with