Skip to content

Instantly share code, notes, and snippets.

View marcjeanson's full-sized avatar

Marc Jeanson marcjeanson

View GitHub Profile
@marcjeanson
marcjeanson / gist:0ab493c9c16661fcfb2445299a206793
Created December 19, 2022 15:02
update-alternatives for Ruby
# I had an existing ruby2.7 installed with the brightbox packages, add it to update-alternatives:
update-alternatives \
--install /usr/bin/ruby ruby /usr/bin/ruby2.7 60 \
--slave /usr/bin/gem gem /usr/bin/gem2.7 \
--slave /usr/bin/bundle bundle /usr/bin/bundle2.7 \
--slave /usr/bin/erb erb /usr/bin/erb2.7 \
--slave /usr/bin/irb irb /usr/bin/irb2.7 \
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc2.7 \
--slave /usr/bin/ri ri /usr/bin/ri2.7
@marcjeanson
marcjeanson / asdf-ruby187-mac.sh
Last active January 16, 2019 22:03
Install ruby 1.8.7 with asdf on macOS Mojave (10.14)
#!/bin/sh
# inspired by https://gist.github.com/yatsu/b62f07ef9ff3ae1e0e2bf9a00b8742b6
# Assumes you already have homebrew and asdf installed!
# brew install openssl gcc@4.9
# If your macOS is Mojave (10.14), install Xcode 10 and
# /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
# (See https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes)

Keybase proof

I hereby claim:

  • I am marcjeanson on github.
  • I am marcjeanson (https://keybase.io/marcjeanson) on keybase.
  • I have a public key ASDGzPoqur-fdX9zmCWrNVo0S6BHnRfIY54Ml4R0qpzf2Qo

To claim this, I am signing this object:

;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (ie. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
@marcjeanson
marcjeanson / gist:5558175
Created May 10, 2013 23:21
It's cool Ruby, I usually don't know what day it is either....
irb(main):003:0> Date.today
=> Sat, 11 May 2013
irb(main):004:0> Date.tomorrow
=> Sat, 11 May 2013
irb(main):005:0> Date.yesterday
=> Thu, 09 May 2013
#!/usr/bin/ruby
#-*-ruby-*-
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
CTAGS = '/usr/local/bin/ctags'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.git/hooks'