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
@evadne
evadne / sidekiq.rb
Created Apr 28, 2014
Starter Sidekiq Configuration
View sidekiq.rb
# config/initializers/sidekiq.rb
require 'sidekiq'
Sidekiq.configure_client do |config|
config.redis = {
:url => ENV['SIDEKIQ_REDIS_URI'],
:namespace => ENV['SIDEKIQ_NAMESPACE'],
:size => ENV['SIDEKIQ_CLIENT_SIZE'] || 5
}
@evadne
evadne / journal
Last active Aug 29, 2015
$ fleetctl journal -f deis-builder@1.service
View journal
core@deis-1 ~ $ fleetctl journal -f deis-builder@1.service
-- Logs begin at Wed 2014-10-08 14:11:41 UTC. --
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(2f651070bd84650340ba1210ef10a8957c74c9dc32d39ff3bf4625cbc355ca1b) = ERR (1)
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] +job image_get(fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4)
Oct 10 15:03:08 deis-3 sh[30201]: No such id: fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4) = ERR (1)
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] +job image_get(4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49)
Oct 10 15:03:08 deis-3 sh[30201]: No such id: 4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49) = ERR (1)
Oct 10 15:03:08 deis-3 sh[30201]:
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
#define FLICKR_METHODS_VIA_POST \
@"flickr.blogs.postPhoto", \
@"flickr.favorites.add", \
@"flickr.favorites.remove", \
@"flickr.groups.pools.add", \
@"flickr.groups.pools.remove", \
@"flickr.photos.addTags", \
@"flickr.photos.delete", \
@"flickr.photos.removeTag", \
@"flickr.photos.setContentType", \
View CPBundle.sj
/*
* CPBundle.sj
* 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];
return;
}
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
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 monoceroi.com.
// 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");
}
You can’t perform that action at this time.