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
(custom-set-variables | |
'(org-display-custom-times t) | |
'(org-time-stamp-custom-formats (cons (concat "<%Y/%m/%d " (substring (current-time-string) 0 3) ">") | |
(concat "<%Y/%m/%d " (substring (current-time-string) 0 3) " %H:%M>"))) | |
) | |
;;; 訂正版 | |
(custom-set-variables | |
'(org-time-stamp-custom-formats (quote ("<%Y/%m/%d %a>" . "<%Y/%m/%d %a %H:%M>"))) | |
) |
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
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'mechanize' | |
require 'rubytter' | |
###################### | |
#mixiのログイン情報 | |
###################### | |
mixi_username ='[email protected]' #mixiのログイン用メールアドレス | |
mixi_password ='xxxxxxx' #mixiのログイン用パスワード |
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
__FILE__ | |
__FUNCTION__ | |
__LINE__ | |
__METHOD__ | |
abs | |
abstract | |
acos | |
acosh | |
addcslashes | |
addslashes |
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
var links = document.getElementsByTagName("a"); | |
for ( var i = 0 ; i < links.length ; i++ ){ | |
(function() { | |
var n = i; | |
var link = links[i]; | |
link.href = "#"; | |
link.onclick = function(){ alert( n ) }; | |
link.innerHTML = n; | |
})() |
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
;; original is http://d.hatena.ne.jp/yaotti/20101216/1292500323 | |
;; patch from usk_t(https://gist.github.com/747399) | |
(defvar helm-git-project-dir nil) | |
(defun git-project:root-dir () | |
(file-name-directory (file-truename | |
(shell-command-to-string "git rev-parse --git-dir")))) | |
(defun helm-git-project:create-source (name options) | |
`((name . ,(concat "Git Project " name)) |
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
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Ocmgen" . ruby-mode)) | |
(defun ruby-mode-hook-init () | |
"encodingを自動挿入しないようにする" | |
(remove-hook 'before-save-hook 'ruby-mode-set-encoding) | |
(define-key ruby-mode-map " " nil) | |
(define-key ruby-mode-map "\C-ce" 'my-ruby-mode-set-encoding) | |
(define-key ruby-mode-map "\C-j" nil)) |
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
gem 'therubyracer' | |
# rspec, cucumber | |
group :test, :development do | |
gem "rspec-rails", "~> 2.6" | |
gem "capybara" | |
gem "spork-rails" | |
gem "autotest" | |
gem "autotest-rails" | |
gem 'rspec-html-matchers' |
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
# encoding: utf-8 | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
doc = Nokogiri::HTML(open("http://creofuga.net/"),nil,"utf-8") | |
open("foo.txt", "w") do |f| | |
doc.css("td").each do |td| | |
f.puts td.text | |
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
require 'rubygems' | |
require 'rack' | |
require 'erb' | |
class RackApp | |
def call(env) | |
[200, {'Content-Type' => 'text/html'}, [<<END_HTML] | |
<html> | |
<head><title>Rack test</title></head> |
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
var Dog = function( t_name, t_color ){ | |
this.name = t_name; | |
this.color = t_color; | |
}; | |
Dog.prototype.bow = function () { | |
alert( this.name ); | |
}; | |
var taro = new Dog( "taro", "black" ); |
OlderNewer