Skip to content

Instantly share code, notes, and snippets.

; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
StringLiterals:
Enabled: false
LineLength:
Max: 99
Encoding:
Enabled: false
HashSyntax:
Enabled: false
config.generators do |g|
g.test_framework :rspec, :fixture => false
g.view_specs false
g.helper_specs false
end
package eventfax.protocol
import scala.collection.jcl.TreeMap
import java.util.Date
import java.text.SimpleDateFormat
import java.text.DateFormat
import scala.collection.jcl.ArrayList
import scala.collection.mutable.Map
class HttpResponse(val pristine: Boolean) {
;; Set the starting position and width and height of Emacs Window
(add-to-list 'default-frame-alist '(left . 0))
(add-to-list 'default-frame-alist '(top . 0))
(add-to-list 'default-frame-alist '(height . 45))
(add-to-list 'default-frame-alist '(width . 175))
;; To get rid of Weird color escape sequences in Emacs.
;; Instruct Emacs to use emacs term-info not system term info
;; http://stackoverflow.com/questions/8918910/weird-character-zsh-in-emacs-terminal
(setq system-uses-terminfo nil)
(setq enh-ruby-program "/home/gnufied/.rbenv/versions/1.9.3-p448/bin/ruby")
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t)
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode))
configuration:
(require 'robe)
(add-hook 'enh-ruby-mode-hook 'robe-mode)
Usage:
I have noticed that when inf-ruby mode loads pry it just hangs because of
pry trying to be smart about determining terminal type. It is
not a problem with robe per se, but the fact that pry is unusable from
AllCops:
RunRailsCops: true
Excludes:
- db/**
HashSyntax:
Description: 'Use either hash rocket or 1.9 styled hashes.'
Enabled: false
LineLength:
module DeBouncer
def self.extened(base)
class << base
@deboucner_module = nil
end
end
def debounce(method_name, time)
if @debouncer_module
@debouncer_module.create_debouncer(method_name, time)
(require 'term)
(defun visit-ansi-term ()
"If the current buffer is:
1) a running ansi-term named *ansi-term*, rename it.
2) a stopped ansi-term, kill it and create a new one.
3) a non ansi-term, go to an already running ansi-term
or start a new one while killing a defunt one"
(interactive)
(let ((is-term (string= "term-mode" major-mode))
(is-running (term-check-proc (buffer-name)))