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
;; | |
;; 第1回 Scheme コードバトン に参加したのですが、Nu対応していたらオリジナルとは別のコードになって | |
;; しまったので、別枠で以下の場所に置きました。 | |
;; | |
;; http://github.com/yuumi3/sheme_baton | |
;; | |
;; | |
;; どうして、別のコードになってしまったのかは | |
;; | |
;; blog http://d.hatena.ne.jp/yuum3/ を見て下さい。 |
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 'redcloth3' | |
require 'redmine/syntax_highlighting' | |
require 'redmine/wiki_formatting/textile/formatter' | |
module Redmine | |
module WikiFormatting | |
module Textile | |
class Formatter < RedCloth3 | |
alias :smooth_offtags_orgin :smooth_offtags |
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/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
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/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
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/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
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
module Rails | |
module Rack | |
class Logger < ActiveSupport::LogSubscriber | |
# Add UserAgent | |
def started_request_message(request) | |
'Started %s "%s" for %s at %s by %s' % [ | |
request.request_method, | |
request.filtered_path, | |
request.ip, | |
Time.now.to_default_s, |
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 | |
require 'taglib' | |
MP_FILE_CLASSES = {'.mp3' => TagLib::MPEG::File, '.m4a' => TagLib::MP4::File} | |
def set_mp_audio_file_to_title(path, title) | |
MP_FILE_CLASSES[File.extname(path)].open(path) {|mp| mp.tag.title = title; mp.save} | |
puts " set #{path} title=#{title}" | |
rescue |
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
def textile_to_markdown(textile) | |
d = [] | |
pre = false | |
table_header = false | |
text_line = false | |
textile.each_line do |s| | |
s.chomp! |
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 | |
require 'io/console' | |
GIT_LIST_PATH = "#{ENV['HOME']}/tmp/git-demo.lst" | |
RED = "\e[31m" | |
YELLOW = "\e[33m" | |
BLACK = "\e[30m" | |
FIN = "\e[0m" |
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
# | |
ruby '2.3.0' | |
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'sinatra-contrib' |
OlderNewer