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
import java.util.List | |
import twitter4j.Query | |
import twitter4j.QueryResult | |
import twitter4j.Tweet | |
import twitter4j.Twitter | |
import twitter4j.TwitterFactory | |
import scala.collection.JavaConversions._ | |
object SimpleTwitterSearchApp { | |
def search(word: String = "#rpscala") { |
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
(ns sample | |
(:import (twitter4j Query | |
QueryResult | |
Tweet | |
TwitterFactory))) | |
(def twitter-api (.. (TwitterFactory.) getInstance)) | |
(defn make-query [word] |
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
import scala.collection.JavaConversions._ | |
import java.util.List | |
import twitter4j.{TwitterFactory, Twitter, Tweet, QueryResult, Query} | |
object SimpleTwitterSearchApp { | |
def search(word: String = "#rpscala"): List[Tweet] = { | |
val query = new Query | |
query.setQuery(word) | |
val twitter = new TwitterFactory().getInstance() |
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
#!/bin/bash | |
# edit | |
exec emacsclient -nw --alternate-editor="" -c "$@" |
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
;;;;;;;;;;;;; | |
;; flymake ;; | |
;;;;;;;;;;;;; | |
;; Flymake PHP Extension | |
(require 'flymake) | |
;; flymake | |
(when (require 'flymake nil t) | |
(global-set-key "\C-cd" 'flymake-display-err-menu-for-current-line) | |
;; PHP |
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
;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; dired configuration ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;; | |
(require 'wdired) | |
(require 'dired) | |
(add-hook 'dired-mode-hook | |
'(lambda () | |
(define-key dired-mode-map [tab] 'dired-hide-subdir) | |
(define-key dired-mode-map "r" 'wdired-change-to-wdired-mode) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; GNU GLOBAL(gtags) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(autoload 'gtags-mode "gtags" "" t) | |
(setq gtags-mode-hook | |
'(lambda () | |
(local-set-key "\M-t" 'gtags-find-tag) | |
(local-set-key "\M-r" 'gtags-find-rtag) | |
(local-set-key "\M-s" 'gtags-find-symbol) | |
(local-set-key "\C-t" 'gtags-pop-stack) |
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
;;;;;;;;;;; | |
;; scala ;; | |
;;;;;;;;;;; | |
(setq load-path (cons "~/.emacs.d/scala-mode" load-path)) | |
(require 'scala-mode-auto) | |
(add-hook 'scala-mode-hook | |
(lambda () | |
(scala-electric-mode) | |
(setq imenu-generic-expression |
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
;;;;;;;;;;; | |
;; scala ;; | |
;;;;;;;;;;; | |
(setq load-path (cons "~/.emacs.d/scala-mode" load-path)) | |
(require 'scala-mode-auto) | |
(add-hook 'scala-mode-hook | |
(lambda () | |
(scala-electric-mode) | |
(setq imenu-generic-expression |
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
--langdef=scala | |
--langmap=scala:.scala | |
--regex-scala=/^[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\1/c,classes/ | |
--regex-scala=/^[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\1/t,traits/ | |
--regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/ | |
--regex-scala=/^[ \t]*def[ \t]+([a-zA-Z0-9_]+)/\1/m,methods/ | |
--regex-scala=/^[ \t]*val[ \t]+([a-zA-Z0-9_]+)/\1/C,constants/ | |
--regex-scala=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)/\1/l,local variables/ | |
--regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ | |
--regex-scala=/^[ \t]*case class[ \t]+([a-zA-Z0-9_]+)/\1/c,case classes/ |
OlderNewer