The RoLLing cOde

Rumor, crap and –un–original

Archive for the ‘Mac’ tag

[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

June 26th, 2011 at 1:54 pm

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

February 20th, 2011 at 4:14 pm

Posted in Crap

Tagged with ,

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

June 20th, 2010 at 9:33 pm

Posted in Crap

Tagged with ,

AdBlock plugin for OmniWeb

without comments

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

April 5th, 2010 at 8:49 pm

Posted in Crap

Tagged with

Idle reminder script for The Hit List

without comments

This handy script will remind(disturb?) you every N minutes about what you are doing (if you begin a task in
The Hit List
) or you are idling right now as
Growl
notification.

Paste the following code to Script Editor, Save.

try
	tell application "GrowlHelperApp" to register as application "THL Notifier" all notifications {"Doing", "Idle"} default notifications {"Doing", "Idle"} icon of application "The Hit List"
	tell application "System Events"
		tell process "The Hit List" to set myDoing to get value of text field 1 of window "Timer"
		tell application "GrowlHelperApp" to notify with name "Doing" title (myDoing) description ("now doing...") application name "THL Notifier" priority 0 sticky no icon of application "The Hit List"
	end tell
on error
	tell application "GrowlHelperApp" to notify with name "Idle" title ("Something to do?") description ("idle...") application name "THL Notifier" priority 0 sticky no icon of application "The Hit List"
end try

Open Terminal, type

crontab -e

Add this line and save ( you can change 15 to what ever minutes between each reminder)

*/15  *    *    *    *    osascript /path/to/Whatsup.scpt

Note: due to the limitation of the time tracking window display in THL, this script does not support Spaces very well.

Written by freewizard

June 1st, 2009 at 9:34 am

Posted in Crap

Tagged with

Install multiple versions of Flash plugin for Firefox

with 2 comments

As developing ActionScript projects, one have to frequently switch between different Flash versions and test. Here is a tip for Mac OSX ( also works on Windows I think ) to install multiple versions of Flash Player plugins for Firefox.

When Firefox starts, it scans for plugins in 3 sets of directories:

  1. General plugin directory for current system and user, e.g.
    /Library/Internet Plug-Ins/
  2. Plugin directory for current application executable file, e.g.
    /Applications/Firefox.app/Contents/MacOS/plugins/
  3. Plugin directory for current profile, e.g. 
    ~/Library/Application Support/Firefox/Profiles/fw9q5h64.default/plugins

Then it will
sort by modification time
, dedupe and load all the plugins.

Now you get the trick:

  1. Extract the desired firefox plugin files (
    e.g. Flash Player.plugin
    and
    flashplayer.xpt
    on Mac ) from Flash plugin installer or copy from installed directory ( e.g.
    /Library/Internet Plug-Ins/
    on Mac )
  2. Copy these files to your favorite firefox app or profile directory
  3. use the command


       touch -t 201603150101.01

    Flash Player.plugin

    flashplayer.xpt

    to make the mtime larger than the one in the general directory.

  4. repeat above steps for all flash versions you want.

Update: you should check “Open using Rosetta” when playing Flash 8 or earlier with Firefox on Mac.

Written by freewizard

April 18th, 2009 at 4:21 pm

Posted in Crap

Tagged with ,

Growl notification for 1G1G.com

without comments

It’s a
Fluid
SSB user script.

// ==UserScript==
// @name        1G1G
// @namespace   http://fluidapp.com
// @description Show Growl notification when song changes
// @include     *
// @author      freewizard gmail.com
// ==/UserScript==

(function () {
    if (window.fluid) {
        window.lastTitle = "亦歌-自由自在听音乐";
        setInterval(function() {
            if (document.title == window.lastTitle) return;
            window.lastTitle = document.title;
            window.fluid.showGrowlNotification({
                title: "亦歌",
                description: window.lastTitle,
                identifier: "www.1G1G.com"
            });
        }, 1000);
    }
})();

Written by freewizard

December 8th, 2008 at 3:38 pm

Posted in Crap

Tagged with

Show unread mails in Skype mood text

without comments

Run the following AppleScript code in Entourage as incoming mail rule and/or scheduled task:


Written by freewizard

October 21st, 2008 at 5:58 am

Posted in Crap

Tagged with ,