Skip to content

Instantly share code, notes, and snippets.

gone fishing

Evadne Wu evadne

gone fishing
Block or report user

Report or block evadne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Shake Window Horizontally
- (void) shakeWindowHorizontally:(NSWindow *)inWindow duration:(float)inDuration vigour:(float)inVigour times:(int)inTimes {
// [self shakeWindowHorizontally:window duration:0.5 vigour:0.05 times:8];
CAKeyframeAnimation *shakeAnimation = [CAKeyframeAnimation animation];
NSRect inFrame = [inWindow frame];
CGMutablePathRef shakePath = CGPathCreateMutable();
CGPathMoveToPoint(shakePath, NULL, NSMinX(inFrame), NSMinY(inFrame));
int index;
View Flickr API methods that you call via HTTP POST, and how to easily identify them
@"flickr.blogs.postPhoto", \
@"flickr.favorites.add", \
@"flickr.favorites.remove", \
@"flickr.groups.pools.add", \
@"flickr.groups.pools.remove", \
@"", \
@"", \
@"", \
@"", \
* AppKit
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
View Adding Accessory View to NSWindow.m
- (void) setAccessoryView: (NSView *)view {
if (view == nil) {
[accessoryView removeFromSuperview];
NSView *themeFrame = [[self contentView] superview];
View provide_html5.js
// Attempt to make a drop-and-forget bunch of scripts that mimick some missing html5 goodies automatically
// Example:
// $(document).ready(function() {
// ProvideHtml5.autofocus()
// ProvideHtml5.datepicker()
// ProvideHtml5.forcenumber()
// })
var ProvideHtml5 = {
autofocus = function() {
View gist:284411
01:10:57 evadne at Tacitus ~ $ capp gen testingApplication
Creating Frameworks directory in /Volumes/Data/testingApplication/Frameworks.
Copying /usr/local/narwhal/packages/objective-j/Frameworks/Objective-J to /Volumes/Data/testingApplication/Frameworks/Objective-J
Copying /usr/local/narwhal/packages/objective-j/Frameworks/Debug/Objective-J to /Volumes/Data/testingApplication/Frameworks/Debug/Objective-J
Copying /usr/local/narwhal/packages/cappuccino/Frameworks/Foundation to /Volumes/Data/testingApplication/Frameworks/Foundation
Copying /usr/local/narwhal/packages/cappuccino/Frameworks/Debug/Foundation to /Volumes/Data/testingApplication/Frameworks/Debug/Foundation
Copying /usr/local/narwhal/packages/cappuccino/Frameworks/AppKit to /Volumes/Data/testingApplication/Frameworks/AppKit
Copying /usr/local/narwhal/packages/cappuccino/Frameworks/Debug/AppKit to /Volumes/Data/testingApplication/Frameworks/Debug/AppKit
01:10:57 evadne at Tacitus ~ $ capp gen testingApplicationLinked -l
evadne / .siFancyScrollbar.less
Created Feb 20, 2010
Fancy Scrollbar (in WebKit). Written using LESS, needs gem to compile down to regular .CSS.
View .siFancyScrollbar.less
.siFancyScrollbar {
::-webkit-scrollbar-button:end:decrement {
width: 9px;
height: 9px;
evadne / monoValidate.js
Created Feb 21, 2010
monoValidate (yup, with an easter egg)
View monoValidate.js
// monoValidate.js by Evadne Wu, this version retrieved 2010. 02. 21. New BSD.
// Library required: jQuery. Evadne is reachable thru
// Notice: malformed URIs galore and our URI schema has not been tested against with many real-world cases yet.
function monoValidate(stringToBeValidated, proposedCategory) {
// So we can leniently call monoValidate to validate against nothing; that way everything that is not required to be validated is valid
View helveticSafari.css
/* helveticSafari shoos Arial away for Safari / WebKit users. Safari — Preferences — Advanced — Style Sheet. */
@font-face {
font-family: "Arial";
src: local("Helvetica");
evadne / plNews.js
Created Mar 13, 2010
Punchy Live’s twitter interactivity engine that is going to be polished and extended into monoTwitterEngine
View plNews.js
// plNews.js
Delegate methods:
plNewsDidReceiveNewerTweets to delegate object
plNewsDidReceiveOlderTweets to delegate object
You can’t perform that action at this time.