<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| # Ways to execute a shell script in Ruby | |
| # Example Script - Joseph Pecoraro | |
| cmd = "echo 'hi'" # Sample string that can be used | |
| # 1. Kernel#` - commonly called backticks - `cmd` | |
| # This is like many other languages, including bash, PHP, and Perl | |
| # Synchronous (blocking) | |
| # Returns the output of the shell command | |
| # Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
| // Assumption: You have a model with a name. | |
| comparator: function (User) { | |
| if (User.get("name")) { | |
| var str = User.get("name"); | |
| str = str.toLowerCase(); | |
| str = str.split(""); | |
| str = _.map(str, function(letter) { return String.fromCharCode(-(letter.charCodeAt(0))) }); | |
| return str; | |
| }; |
rsync (Everyone seems to like -z, but it is much slower for me)
| # Stub commands printing it's name and arguments to STDOUT or STDERR. | |
| stub() { | |
| local cmd="$1" | |
| if [ "$2" == "STDERR" ]; then local redirect=" 1>&2"; fi | |
| if [[ "$(type "$cmd" | head -1)" == *"is a function" ]]; then | |
| local source="$(type "$cmd" | tail -n +2)" | |
| source="${source/$cmd/original_${cmd}}" | |
| eval "$source" | |
| fi |
| namespace :figaro do | |
| desc "SCP transfer figaro configuration to the shared folder" | |
| task :setup do | |
| transfer :up, "config/application.yml", "#{shared_path}/application.yml", via: :scp | |
| end | |
| desc "Symlink application.yml to the release path" | |
| task :symlink do | |
| run "ln -sf #{shared_path}/application.yml #{latest_release}/config/application.yml" | |
| end |
If you find that vagrant box list somehow does not contain a box you previously had, you can sometimes add the box back if you still have the sources for it in ~/.vagrant.d/boxes.
$ cd ~/.vagrant.d/boxes/precise64/0/virtualbox/
$ tar czf ~/precise64.box .
$ vagrant box add precise64 ~/precise64.box
Downloading box from URL: file:/Users/ryanuber/precise64.box
Extracting box...te: 417M/s, Estimated time remaining: --:--:--)
Successfully added box 'precise64' with provider 'virtualbox'!
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="red_50">#fde0dc</color> | |
| <color name="red_100">#f9bdbb</color> | |
| <color name="red_200">#f69988</color> | |
| <color name="red_300">#f36c60</color> | |
| <color name="red_400">#e84e40</color> | |
| <color name="red_500">#e51c23</color> | |
| <color name="red_600">#dd191d</color> | |
| <color name="red_700">#d01716</color> |
| import code; code.interact(local=dict(globals(), **locals())) |
| var MARGIN = 28; | |
| // Fullscreen | |
| slate.bind('f:cmd,alt', function(win) { | |
| // ±4 to account for hidden Dock on left of screen. | |
| win.doOperation(S.op('move', { | |
| 'x': 'screenOriginX - 4 + ' + MARGIN, | |
| 'y': 'screenOriginY + ' + MARGIN, |