There is a cheat-sheet available of the default set keystrokes which cabbage comes with.
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
Convert a GitHub Issue Into a Pull Request | |
A little-known-feature of the GitHub API is the ability to attach changes to an issue, converting it into a pull request. The hub command, a wrapper around git that makes it more GitHub aware, allows you to easily do this. | |
hub pull-request -i 384 -b bkeepers:master -h bkeepers:branch-name | |
-i is the GitHub issue number | |
-b is the base, or where you want to send the pull request, with bkeepers being the owner of the repository. | |
-h is the head, or the branch where your changes live. | |
Update: in the comments, George Hickman suggests: “as long as you’ve pushed your changes and your local branch is tracking your remote you can exclude the -b and -h options!”. Note that you can set up tracking when pushing with git push -u origin branch-name. |
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
[format] | |
pretty = %C(yellow)%h%Creset%C(green)%d%Creset %s %C(red)[%an]%Creset %C(cyan)[%cr]%Creset |
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
# karma config file | |
module.exports = function(config) { | |
config.set({ | |
basePath: __dirname + '../../../', | |
frameworks: ['jasmine'], | |
browsers: ['PhantomJS'], | |
reporters: ['dots'], | |
autoWatch: 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
#!/bin/bash | |
# | |
# god Startup script for God monitoring tool. | |
# | |
# chkconfig: - 85 15 | |
# description: god monitors your system | |
# | |
CONF_DIR=/var/www/<project>/config/unicorn_god.rb | |
PID=/var/run/god.pid |
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
context = describe | |
before = beforeEach | |
describe "LockIconToggleCtrl", -> | |
beforeEach(angular.mock.module("test")) | |
scope = {} | |
ctrl = {} |
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
class ActiveSupport::TestCase | |
class << self | |
remove_method :describe | |
alias :context :describe | |
end | |
extend MiniTest::Spec::DSL | |
end |
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
(ert-deftest test-flatten-of-list () | |
(should (equal (elixir-mix-flatten '(1 2 (3 4) 5)) | |
'(1 2 3 4 5))) | |
(should (equal (elixir-mix-flatten '(1 2 ("wood" "fire" (3)) 4 5)) | |
'(1 2 "wood" "fire" 3 4 5)))) |
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
(defun elixir-mix-flatten (alist) | |
(cond ((null alist) nil) | |
((atom alist) (list alist)) | |
(t (append (elixir-mix-flatten (car alist)) | |
(elixir-mix-flatten (cdr alist)))))) | |
(ert-deftest test-flatten-of-list () | |
(should (equal (elixir-mix-flatten '(1 2 (3 4) 5)) | |
'(1 2 3 4 5))) | |
(should (equal (elixir-mix-flatten '(1 2 ("wood" "fire" (3)) 4 5)) |
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
(defun karma-project-root () | |
(let ((file (file-name-as-directory (expand-file-name default-directory)))) | |
(karma--project-root-identifier file karma--project-root-indicators))) | |
(defun karma--project-root-identifier (file indicators) | |
(let ((root-dir (if indicators (locate-dominating-file file (car indicators)) nil))) | |
(cond (root-dir (directory-file-name (expand-file-name root-dir))) | |
(indicators (karma--project-root-identifier file (cdr indicators))) | |
(t nil)))) |