I hereby claim:
- I am jtrim on github.
- I am jessetrimble (https://keybase.io/jessetrimble) on keybase.
- I have a public key ASDuRkIsH2pYoAsTtZLJPHLNggBWU6OEfS8_fNXVktCrQAo
To claim this, I am signing this object:
| ;;; Helper functions | |
| (defun setup-go-mode () | |
| (require 'go-guru) | |
| (add-hook 'before-save-hook 'gofmt-before-save) | |
| (setq fill-column 80) | |
| (setq indent-tabs-mode 1) | |
| (setq tab-width 2) | |
| (setq gofmt-command "goimports") | |
| (go-guru-hl-identifier-mode) |
I hereby claim:
To claim this, I am signing this object:
| (require 'seq) | |
| (defun magit-rspec-run-changed-files () | |
| (interactive) | |
| (let ((changed-files (seq-filter 'magit-rspec--spec-file-p (mapcar 'car (magit-file-status))))) | |
| (rspec-run-multiple-files changed-files))) | |
| (defun magit-rspec--spec-file-p (filename) | |
| (string-suffix-p "_spec.rb" filename)) |
| package main | |
| import ( | |
| "image" | |
| "image/png" | |
| "os" | |
| ) | |
| func Show(f func(int, int) [][]uint8) { | |
| const ( |
| # Example for https://twitter.com/jessetrimble/status/910940206924050432 | |
| def test_matches_fixture_document | |
| (1..3).each do |row_number| | |
| expected_value = fixture_spreadsheet.cell(row, "A") | |
| assert_equal get_value_from_db, expected_value | |
| end | |
| end | |
| ###### Refactored to: |
As of this writing (2017-07-24), Ruby 2.3.4 doesn't build on Fedora 26 because of GCC 7 and openssl 1.1 being the defaults.
Fedora 26 allows for installation of only Ruby 2.4 from the default repositories. My preference for Ruby management on Linux are chruby and ruby-install. To install Ruby 2.3 on Fedora 26 with ruby-install:
$ ./config --prefix=/usr/local/openssl-1.0.2l shared$ sudo make install| require 'yaml' | |
| require 'busted' | |
| require 'ostruct' | |
| obj = Object.new | |
| module Stuff | |
| def bar | |
| end | |
| end |
| def with_retry(timeout=0.25, tries=3) | |
| exception = \ | |
| tries.times.reduce(nil) do | |
| begin | |
| result = yield | |
| rescue StandardError => ex | |
| sleep timeout | |
| ex | |
| else | |
| return result |
| Plugin 'junegunn/goyo.vim' | |
| " =================== | |
| " Goyo | |
| " =================== | |
| function! s:goyo_enter() | |
| setlocal wrap linebreak nolist | |
| set virtualedit= | |
| setlocal display+=lastline | |
| noremap <buffer> <silent> k gk |
| #!/usr/bin/env ruby | |
| require 'pathname' | |
| def print_usage | |
| puts "USAGE: test-unit-runner path/to/spec.rb[:<line-number>]" | |
| end | |
| unless ARGV.first | |
| print_usage | |
| exit 1 |