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 | |
# -*- coding: utf-8 -*- | |
require 'uri' | |
from_clipboard = `xsel -b` | |
uris = URI.extract(from_clipboard) | |
exec 'chromium-browser', '--temp-profile', *uris | |
# for zsh | |
# chromium-browser --temp-profile "$uri" $* & |
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
こちらで起きた https://gist.github.com/2784723/ | |
経緯はこちらに書きました https://gist.github.com/2784777 | |
編集時にファイル名に$をまぜるとファイルが増えるわかめちゃん |
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
https://gist.github.com/2784723/ | |
こちらで起きた | |
経緯 | |
- ~/.vim/syntax/markdown.vim というファイル名でウェブから登録出来なかった | |
- $HOME-.vim-syntax-markdown.vim にしたら登録できた | |
- 編集しようとしたら、 $HOME-.vim-syntax-markdown.vim が HOME-.vim-syntax-markdown.vim に分裂した。 | |
- 両方共消さなくなった。 | |
- やばい!!!!!!!!!!!!!!!!!!!!!!!! |
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
" ~/.vim/syntax/markdown.vim | |
" \c で 大文字小文字無視します :help /\c | |
" todo: TODO: をハイライトしたい | |
syntax match myTodo /\ctodo:/ | |
" done: DONE: をハイライトしたい | |
syntax match myDone /\cdone:/ | |
" 適当に色付け | |
highlight link myTodo Todo |
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
#Deploy and rollback on Heroku in staging and production | |
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |
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 'open-uri' | |
require 'nokogiri' | |
require 'MeCab' | |
class WordsArray < Array | |
def nouns | |
select{ |w| | |
w.is_noun | |
} |
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
$ markdown --version | |
This is Markdown, version 1.0.1. | |
Copyright 2004 John Gruber | |
http://daringfireball.net/projects/markdown/ | |
$ which markdown | |
/usr/bin/markdown | |
$ markdown test.txt |
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
@-moz-document domain("friendfeed.com") { | |
/**** friendfeedをシンプルにするあれ ****/ | |
/*既知の問題: [todo] autopagerizeでサムネイル画像が消える件 */ | |
/** 投稿欄を見えなくする(できればjsで要素をなくしたい) **/ | |
.sharebox { | |
display: none !important; | |
} | |
/** 上下幅を弄るにはまずこれ **/ |
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 | |
puts ARGF.read.split(/\b+/).map{|x|x.split(//).sort.join }.join |
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
# Simple and Stupid Ruby API for Coderwall.com | |
# Vivien Didelot <[email protected]> | |
require "open-uri" | |
require "json" | |
module CoderWall | |
class Achievement | |
attr_reader :name, :badge, :description |