Skip to content

Instantly share code, notes, and snippets.

d-i apt-setup/security_host string old-releases.ubuntu.com
d-i mirror/country string enter information manually
d-i mirror/http/hostname string old-releases.ubuntu.com
{ :size (typed conditional-set
:when [{ :condition (:parent :color (= "blue")) }
:values ["a" "b" "c"] }
{ :condition (:parent :color (= "red")) }
:values ["1" "2" "3"] }
]) }
@ynniv
ynniv / gist:3862734
Created October 10, 2012 02:06
passing fields as a variable to defrecord
(defmacro defrecord+fields
"Supply the fields of a record using a variable."
[name fields & specs]
(let [fields (eval fields)]
`(defrecord ~name ~fields ~@specs)))
// ==========================================================================
// Project: WhenAbout.com / Front
// Copyright: ©2010 Touch of Logic LLC, Vincent Fiano <ynniv@touchoflogic.com>
// ==========================================================================
// This is sample code for DataSources and remote queries. It was compiled from
// multiple files, and extraneous code and comments have been removed. It
// probably does not function out of the box. You've been warned.
Front = SC.Application.create(
/** @private - setup observer on init if needed. */
init: function() {
sc_super();
if (this.get('content')) this._scoc_contentDidChange();
if (this.get('observableContent')) this._scoc_observableContentDidChange();
},
_scoc_contentDidChange: function () {
var last = this._scoc_content,
cur = this.get('content');
module("SC.ObjectController - single_enumerable_case - OBSERVABLE OBJECT", {
setup: function() {
src = SC.Object.create({ foo: "foo1", bar: "bar1" });
content = SC.Set.create(); // use generic enumerable
controller = SC.ObjectController.create({
content: content,
allowsMultipleContent: NO
});
content.add(src);
},
http://news.ycombinator.com/item?id=952356
24 points by edw519 4 days ago | link | parent | flag
I have worked from home off and on for years, and this is pretty good advice. The most important is the dedicated space with a door that closes. So you still "go to work", just with a very short commute. A few other things that I have found helpful:
- When you're in your office, you're at work, working.
- When you're not in your office, you're at home, not working.
- Work in 48 minute bursts, then take a break.
- Only check email & voice mail during your 12 minutes off.
(Aqua/E)macs deficiencies:
- working across files (projects)
- searching for strings in project
- opening other files in project
- viewing files, opened or not
- tabs
- cannot be reordered
- cannot be torn off or reparented
- vast over-use of control key
- poor file browsing
#!/usr/bin/env python2.6
## MacPorts needless dependency cleaning. Edit 'keep' first!!!
#
## requires python >= 2.6!
#
## Vincent Fiano <ynniv@ynniv.com>
# FIXME: the packages that you care about go here!
keep = ['libidl', 'graphviz', 'bash-completion']
/* in MyListItemView.js */
MyListItemView = SC.ListItemView.design({
});
/* */
kasesView: SC.ScrollView.design({
hasHorizontalScroller: NO,
classNames: "kasesView",
layout: { top: 60, bottom: 0, left: 0, right: 0 },