- Reserve the master branch for production, staging, and hotfixes
- Write new code on a feature branch
- Rebase feature branches onto master as often as reasonable
- Merge feature branches into master with a no-ff, no-squash merge commit
- Preserve branch names for reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on open theFiles | |
| repeat with aFile in theFiles | |
| if application "Adobe Photoshop CC" is running then | |
| tell application "Adobe Photoshop CC" | |
| open aFile | |
| activate | |
| end tell | |
| else | |
| tell application "Preview" to open aFile | |
| end if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| box: wercker/default | |
| services: | |
| - wercker/postgresql | |
| - wercker/rabbitmq | |
| - wercker/redis | |
| build: | |
| steps: | |
| - script: | |
| name: install clojure | |
| code: | |
Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
- The best tutorials are in the introductory books. See below.
- Getting Started with Clojure - A detailed tutorial on getting a modern (as of Jan 2013) Clojure workflow going.
- Emacs Live is a nice development environment based on Emacs.
- Understanding The Clojure Development Ecosystem
- Clojure Docs Site is a community-driven doc site with good tutorials, and reference material going somewhat deeper than individual API docs.
- Functional Programming for the Rest of Us is a classic introduction to functional thinking
- [A comprehensive article on namespaces and different ways of requiring them](http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; from leiningen, use [dorothy/dorothy "0.0.3"] | |
| (require '[dorothy.core :as dot]) | |
| ;; dataflow copied from chat | |
| ;; https://github.com/pedestal/samples/blob/master/chat/chat-client/app/src/chat_client/behavior.clj | |
| (def dataflow '{:transform | |
| {:outbound {:init {} :fn outbound-transform} | |
| :inbound {:init {} :fn inbound-transform} | |
| :nickname {:init nil :fn nickname-transform}} | |
| :effect {:outbound send-message-to-server} |
Here are a list of headless browsers that I know about:
- [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
- [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
- [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
- [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
- [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
- [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
- [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
- [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request | |
| navigationType:(UIWebViewNavigationType)navigationType { | |
| NSString *urlString = [[request URL] absoluteString]; | |
| if ([urlString hasPrefix:@"js:"]) { | |
| NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject] | |
| stringByReplacingPercentEscapes]; | |
| NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; | |
| NSError *error; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn md5-sum | |
| "Compute the hex MD5 sum of a string." | |
| [#^String input] | |
| (let [alg (doto (MessageDigest/getInstance "MD5") | |
| (.update (.getBytes input))) | |
| hash (.toString (new BigInteger 1 (.digest alg)) 16) | |
| length (.length hash)] | |
| (if (> 32 length) | |
| ;; 0x065 => 65, leading zero is dropped by BigInteger | |
| (apply str (concat (repeat (- 32 length) \0) hash)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; borrowed from ibdknox/jayq | |
| (defn map->js [m] | |
| (let [out (js-obj)] | |
| (doseq [[k v] m] | |
| (aset out (name k) v)) | |
| out)) | |
| (defn clj->js | |
| "Recursively transforms ClojureScript maps into Javascript objects, | |
| other ClojureScript colls into JavaScript arrays, and ClojureScript |