Skip to content

Instantly share code, notes, and snippets.

@gmgp
gmgp / development.rb
Last active February 27, 2018 08:36
For subl:// links on Debian to open in Sublime-Text-3 (rails-footnotes, better-errors...)
# config/environments/development.rb
...
if defined? BetterErrors
# Force all developers on this project to use VS Code, even if they prefer something else.
BetterErrors.editor = proc { |file, line| "subl://#{file}:#{line}"}
end
@gmgp
gmgp / web-servers.md
Created July 31, 2021 19:21 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@gmgp
gmgp / private_attr_writer.rb
Created August 6, 2021 07:14 — forked from JoshCheek/private_attr_writer.rb
private attr_writer
class Klass
def initialize(number)
self.number = number
end
attr_reader :number
private
attr_writer :number