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
;; Icelandic keyboard setup | |
(define-key key-translation-map (kbd "M-ö") (kbd "\\")) | |
(define-key key-translation-map (kbd "M-8") (kbd "[")) | |
(define-key key-translation-map (kbd "M-9") (kbd "]")) | |
(define-key key-translation-map (kbd "M-7") (kbd "{")) | |
(define-key key-translation-map (kbd "M-0") (kbd "}")) | |
(define-key key-translation-map (kbd "M-q") (kbd "@")) | |
(define-key key-translation-map (kbd "M--") (kbd "~")) |
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
org.jruby.RubyMatchData.updateCharOffset(RubyMatchData.java:137) | |
org.jruby.RubyMatchData.begin19(RubyMatchData.java:479) | |
org.jruby.RubyMatchData$i$1$0$begin19.call(RubyMatchData$i$1$0$begin19.gen:65535) | |
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:167) | |
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) | |
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) | |
org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110) | |
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) | |
org.jruby.ast.BlockNode.interpret(BlockNode.java:71) | |
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) |
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
require 'set' | |
class Hash | |
def dig(key, *rest) | |
if value = (self[key] rescue nil) | |
if rest.empty? | |
value | |
elsif value.respond_to?(:dig) | |
value.dig(*rest) | |
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
#!/usr/bin/env ruby | |
usage_description = """Usage: | |
github-open <commit> [<path> [<line-number>]] | |
Uses the <origin> remote's URL, and assumes that it's a Github repo. | |
""" | |
args = ARGV |
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
$ garden dev --hot=frontend | |
Good morning! Let's get your environment wired up... | |
✔ local-kubernetes → Configured | |
✔ tiller → Installing to garden-system... → Done (took 5.9 sec) | |
ℹ tiller → Service deployed | |
ℹ tiller → Service deployed | |
✔ kubernetes-dashboard → Building version v-4f7ba3eeaf... → Done (took 1.5 sec) | |
✔ ingress-controller → Building version v-df47c0150b... → Done (took 1.5 sec) |
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
hotReload: | |
sync: | |
- source: app/ | |
target: /usr/src/app/app |
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
services: | |
- name: frontend | |
ports: | |
- name: http # Maps 80 to 3000. | |
containerPort: 3000 | |
ingresses: | |
- path: / | |
port: http | |
hostname: vote-rails.local.app.garden | |
dependencies: |
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
tasks: | |
- name: db-migrate | |
args: [rake db:migrate] | |
dependencies: | |
- postgres |
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
kind: Module | |
description: Postgres container for storing voting results | |
type: container | |
name: postgres | |
image: postgres:9.4 | |
Services: | |
- name: postgres | |
volumes: # A persistent volume for the data. | |
- name: data | |
containerPath: /db-data |
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
$ garden run module frontend "rails console" | |
Running command rails console in module frontend 🏃 | |
✔ frontend → Getting build status... → Done (took 0.4 sec) | |
Loading development environment (Rails 5.2.2.1) | |
irb(main):001:0> Vote.where(animal: "cat").count | |
(0.7ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."animal" = $1 [["animal", "cat"]] | |
=> 6 |
OlderNewer