- Open Automator
- Create a new Service
- Add a
Run Shell Script
action - Set input to Service receives selected
files or folders
inany application
- Set the script action to
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
- Set Pass input to
as arguments
- Save as
Open in Sublime Text
This file contains 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
1603 | |
ALLS WELL THAT ENDS WELL | |
by William Shakespeare | |
Dramatis Personae | |
KING OF FRANCE |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am vincentmac on github. | |
* I am vincent (https://keybase.io/vincent) on keybase. | |
* I have a public key whose fingerprint is E4E4 BE49 696B 7C7D C436 F2D8 A95E 37A9 D355 5AAC | |
To claim this, I am signing this object: |
This file contains 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
curl -v -X HEAD -d '{"username":"vincent"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/users/search | |
curl -v -d '{"username":"vincent"}' -H "Content-Type: application/json" http://127.0.0.1:5000/api/users/search | |
Search for all users | |
http://127.0.0.1:8091/riak/users?keys=true # List all keys, old format | |
http://127.0.0.1:8091/buckets/users/keys?keys=true # List all keys, new format | |
http://127.0.0.1:8091/solr/users/select?q=username%3Atestuser&rows=10000&wt=json | |
Search for all accounts |
This file contains 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
// Vincent Mac | |
// coded up answer to what John had asked me. | |
// Wrapped in anonymous function to prevent polution of global namespace. | |
(function() { | |
"use strict"; | |
var maxWidth = 50; // desired column width in number of characters | |
var paragraph = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; | |
// var paragraph = "one two three four five six seven eight nine ten"; |
This file contains 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
/** | |
* The way I can currently get event emitters working. | |
* Look at the `.on` handler. | |
* | |
* Why do I have to wrap the listener function `executeSomeWork` in an | |
* anonymous function when I want to pass an argument from the emitter? | |
*/ | |
function executeSomeWork(stuff) { | |
console.log(stuff); |
This file contains 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
#!/bin/sh | |
# Vincent Mac | |
# Simple start/stop script for launching Riak Cluster for local development or fast track | |
# After building your dev environment using `make devrel`, place this script in the `dev` folder | |
# Identify the script name | |
SCRIPT=`basename $0` | |
case "$1" in | |
start) |
This file contains 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
/*! | |
* user.js | |
* User Model using Riak as a datastore | |
*/ | |
/** | |
* Model dependencies | |
*/ | |
var db = require('riak-js').getClient({debug: true, port:8091, api: 'http'}); |
This file contains 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
// models.user.js | |
// User Model Tests | |
// Chai Assertion Library | |
var chai = require('chai') | |
, expect = chai.expect | |
, should = chai.should() | |
, User = require('../models/user'); | |
chai.Assertion.includeStack = true; // defaults to false |
This file contains 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
#! bash | |
# cli for loop to start riak dev cluster | |
for i in {1..4}; do dev$i/bin/riak start; done |
NewerOlder