This file contains hidden or 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
;;==================================== | |
;;; auto-complete.el | |
;;==================================== | |
(require 'auto-complete-config) | |
(ac-config-default) | |
(global-auto-complete-mode t) | |
(add-to-list 'ac-modes 'org-mode) | |
(add-to-list 'ac-modes 'python-mode) | |
(add-to-list 'ac-modes 'text-mode) | |
(add-to-list 'ac-modes 'shell-script-mode) |
This file contains hidden or 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
;;;;;;;;;;;;;;;; | |
;; windowmove ;; | |
;;;;;;;;;;;;;;;; | |
(setq windowmove-wrap-around t) | |
(windmove-default-keybindings) | |
(global-set-key (kbd "C-S-p") 'windmove-up) | |
(global-set-key (kbd "C-S-n") 'windmove-down) | |
(global-set-key (kbd "C-S-f") 'windmove-right) | |
(global-set-key (kbd "C-S-B") 'windmove-left) |
This file contains hidden or 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
(global-set-key "\M-n" (lambda () (interactive) (scroll-up 1))) | |
(global-set-key "\M-p" (lambda () (interactive) (scroll-down 1))) |
This file contains hidden or 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
def exec(command:String) = { | |
import java.lang._ | |
import java.io._ | |
def getResult(command:String):Option[BufferedReader] = { | |
try { | |
val is = Runtime.getRuntime().exec(command).getInputStream() | |
Some(new BufferedReader(new InputStreamReader(is))) | |
} catch { | |
case _ => None |
This file contains hidden or 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
key.setGlobalKey(["C-x", "g"], function (ev) { | |
BrowserOpenTab(); | |
loadURI("http://www.google.co.jp"); | |
}, '新しいタブを開いてGoogleに飛ぶ', true); | |
key.setViewKey('S', function() { | |
function mySearch(word){ | |
var query = "q=" + encodeURIComponent(word); | |
BrowserOpenTab(); |
This file contains hidden or 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
// clipboard操作 | |
function getCurrentURL() { | |
return window._content.document.location.href; | |
} | |
function getCurrentTitle() { | |
return window._content.document.title; | |
} | |
function copyTextToClipboard(text) { |
This file contains hidden or 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
key.setViewKey('f', function() { | |
function collectFeedsURL() { | |
var doc = window._content.document; | |
var links = doc.getElementsByTagName('link'); | |
var urls = new Array(); | |
for (var i = 0; i < links.length; ++i) { | |
var type = links[i].getAttribute('type'); | |
if (type == "application/rss+xml" || type == "application/atom+xml") { | |
urls.push(links[i].href); | |
} |
This file contains hidden or 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
key.setViewKey(["C-x", "l"], function () { | |
var currentURL = window._content.document.location.href; | |
var nextURL = window.prompt("Input URL", currentURL); | |
if (nextURL != null) { | |
loadURI(nextURL); | |
} | |
}, "指定URLへジャンプ", true); | |
This file contains hidden or 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.{Date, Properties} | |
import javax.mail._ | |
import javax.mail.internet._ | |
val host = "smtp.gmail.com" | |
val username = "your_mail_address at gmail.com" | |
val password = "your_password" | |
val props: Properties = System.getProperties | |
props.put("mail.smtps.auth", "true") |
This file contains hidden or 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.io.Source | |
import scala.xml.XML | |
import java.net.URL | |
case class Entry(title: String, link: URL) | |
val rssURL = "http://d.hatena.ne.jp/tototoshi/rss" | |
val src = Source.fromURL(rssURL) | |
try { |