homesick cd CASTLE # Open a new shell in the root of the given castle
homesick clone URI # Clone +uri+ as a castle for homesick
homesick commit CASTLE MESSAGE # Commit the specified castle's changes
homesick destroy CASTLE # Delete all symlinks and remove the cloned repository
homesick diff CASTLE # Shows the git diff of uncommitted changes in a castle
homesick generate PATH # generate a homesick-ready git repo at PATH
homesick help [COMMAND] # Describe available commands or one specific command
homesick list # List cloned castles
| // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| // Simple test program invoked with an option to eagerly | |
| // compile all code that is loaded in the isolate. | |
| // VMOptions=--compile_all | |
| class HelloDartTest { | |
| static testMain() { | |
| print("Hello, Darter!"); |
| Black: 0, 0, 0 | |
| Red: 229, 34, 34 | |
| Green: 166, 227, 45 | |
| Yellow: 252, 149, 30 | |
| Blue: 196, 141, 255 | |
| Magenta: 250, 37, 115 | |
| Cyan: 103, 217, 240 | |
| White: 242, 242, 242 |
| App.PickADate = Ember.View.extend({ | |
| attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort', | |
| 'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today', | |
| 'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector', | |
| 'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'], | |
| events: ['onOpen', 'onClose', 'onSelect', 'onStart'], | |
| tagName: 'input', | |
| classNames: 'pickadate', |
| // Based on https://github.com/james2doyle/saltjs | |
| window.$ = function(s) { | |
| return document[{ | |
| '#': 'getElementById', | |
| '.': 'getElementsByClassName', | |
| '@': 'getElementsByName', | |
| '=': 'getElementsByTagName'}[s[0]] | |
| || 'querySelectorAll'](s.slice(1)) | |
| }; |
| 'createTouch' in document && (jQuery.event.special.click = { | |
| setup: function(data, namespaces, eventHandle) { | |
| var t; | |
| $(this).bind('touchstart.touchClick', function() { | |
| t = +new Date; | |
| }).bind('touchend.touchClick', function(e) { | |
| if (+new Date < t + 200) { | |
| $(this).trigger('click', e); | |
| } | |
| }) |
#Four Ways To Do Pub/Sub With jQuery 1.7 and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2492984/hack.sh | sh | |
| # |
| /** | |
| * parseTemplate takes a string and a JS Object and returns a string with template | |
| * replaced with content you provided. Template tags look like: {{tag}} | |
| * @param {String} s This is the string to search for tags in. | |
| * @param {Object} j This is the JS object that contains a key=>value pair for the tag and what to be replaced | |
| * @returns {String} returns the modified string with the content you provided in replacement of the tags | |
| * @example var html = parseTemplate('Hey, {{name}}',{ name:'John' }); //returns "Hey, John" | |
| */ | |
| var parseTemplate = function(s,j){ | |
| for(x in j){ var r = new RegExp('{{'+x+'}}','g'); s = s.replace(r,j[x]); } |
| // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| // Simple test program invoked with an option to eagerly | |
| // compile all code that is loaded in the isolate. | |
| // VMOptions=--compile_all | |
| class HelloDartTest { | |
| static testMain() { | |
| print("Hello, Darter!"); |