Or, why you should write good commit messages.
Or, writing good commit messages is easier than you think
The $C2:$C13 for the COUNTIF should actually be the selection for the entire set of computed month. | |
In my example, it should really be $C2:$C3. | |
| tool | start date | computed month | | month | count | | |
|--------+-----------------+----------------+---+---------+---------------------------| | |
| drill | Sept 15, 2019 | 2019-09 | | 2018-10 | =COUNTIF($C$2:$C$13, E2) | | |
| hammer | October 8, 2018 | 2018-10 | | 2018-11 | =COUNTIF($C$2:$C$13, E3) | | |
| | | | | 2018-12 | =COUNTIF($C$2:$C$13, E4) | |
module API | |
module Vendor | |
class Client | |
def hello! | |
puts "Vendor Client Hello!" | |
end | |
end | |
class Helper | |
def hello! |
;; I use it for other things, but in this case, its used to give you a | |
;; list of terminal buffers to choose from. FWIW, you could hard-code | |
;; the buffer name. | |
(defun ajv-ido-completing-read-for-mode (prompt the-mode) | |
(ido-completing-read prompt | |
(save-excursion | |
(delq | |
nil | |
(mapcar (lambda (buf) | |
(when (buffer-live-p buf) |
;; Define some before and after hooks | |
(defcustom rspec-after-verification-hook nil | |
"Hooks run after `rspec-verify' and its variants. They | |
execute after failures have been stored in | |
`rspec-last-failed-specs'." | |
:type 'hook | |
:group 'rspec-mode) | |
(defcustom rspec-before-verification-hook nil | |
"Hooks run before `rspec-verify' and its variants." |
Is it worth it, let me work it | |
I put my thing down, flip it and reverse it | |
Ti esrever dna ti pilf nwod gniht ym tup I | |
Ti esrever dna ti pilf nwod gniht ym tup I |
# On procs, Ruby aliases `===` to `call` | |
# The comparator that a case statement uses is `===` | |
# This means that you can use procs as when clauses | |
a_proc = proc { "I'm a proc" } | |
b_proc = proc {|x| "I'm a proc that says '#{x}'"} | |
a_proc.call # => I'm a proc | |
b_proc.call # => I'm a proc that says '' | |
b_proc.call "Hello!" #=> I'm a proc that says 'Hello!' |
;; This send a given command to a vagrant machine | |
;; The project is an important convention. Its used to: | |
;; - temporarily cd into the directory for sending the command | |
;; In my case, my work is in ~/dev/, so it'd be ~/dev/project-name/ | |
;; - its used in the name of the output buffer | |
;; - its used in the ssh command | |
;; You'll need an alias to the VM in your ~/.ssh/ | |
;; You can get it with `vagrant ssh-config'. | |
;; I'd not use 'default', if you've got more than 1. | |
;; |
(defun vagrant-rspec-spec-file-for (orig-fun a-file-name) | |
"Convert file name from local to vagrant" | |
(apply orig-fun (list (replace-regexp-in-string "^.+/spec" "/vagrant/spec" a-file-name)))) | |
(with-eval-after-load 'rspec-mode | |
(setq rspec-spec-command "vrspec" | |
rspec-command-options "--format=progress --no-profile" | |
rspec-use-bundler-when-possible nil | |
rspec-use-opts-file-when-available nil) |
require "benchmark" | |
def interleave(*arrays) | |
result = [] | |
current_positions = Array.new(arrays.length) { 0 } | |
completed_arrays = Array.new(arrays.length) { false } | |
while true | |
arrays.each_with_index do |array, index| | |
current_position = current_positions[index] |