Skip to content

Instantly share code, notes, and snippets.

View evadne's full-sized avatar
🎣
gone fishing

Evadne Wu evadne

🎣
gone fishing
View GitHub Profile
@evadne
evadne / sidekiq.rb
Created April 28, 2014 04:03
Starter Sidekiq Configuration
# 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 August 29, 2015 14:07
$ fleetctl journal -f deis-builder@1.service
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]:
- (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;
#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", \
@evadne
evadne / CPBundle.sj
Created December 17, 2009 05:52 — forked from nickjs/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
- (void) setAccessoryView: (NSView *)view {
if (view == nil) {
[accessoryView removeFromSuperview];
return;
}
NSView *themeFrame = [[self contentView] superview];
// 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() {
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 February 21, 2010 02:15
monoValidate (yup, with an easter egg)
// 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
/* helveticSafari shoos Arial away for Safari / WebKit users. Safari — Preferences — Advanced — Style Sheet. */
@font-face {
font-family: "Arial";
src: local("Helvetica");
}