例文を組み込んだAlfred Workflowを作りました: Alfred Git Commit Message Example
以下転載:
以下転載:
| package sample; | |
| import javafx.animation.AnimationTimer; | |
| import javafx.fxml.FXML; | |
| import javafx.fxml.Initializable; | |
| import javafx.scene.control.Label; | |
| import javafx.scene.paint.Color; | |
| import rx.Observable; | |
| import rx.subscriptions.Subscriptions; |
I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.
I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.
This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.
| # -*- coding: utf-8 -*- | |
| class String | |
| def fuck(output=STDOUT, input=STDIN) | |
| identity = lambda do |value| | |
| return value | |
| end | |
| increment = lambda do |value| | |
| return value+1 | |
| end | |
| decrement = lambda do |value| |
| pax@ubuntu:~/projects/missionhub$ ruby -v | |
| ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] | |
| pax@ubuntu:~/projects/missionhub$ rails -v | |
| Rails 3.1.3 | |
| pax@ubuntu:~/projects/missionhub$ rake -V | |
| rake, version 0.9.2.2 | |
| pax@ubuntu:~/projects/missionhub$ bundle exec rake db:migrate --trace | |
| DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0 | |
| ** Invoke db:migrate (first_time) | |
| ** Invoke environment (first_time) |
| #!/usr/bin/env ruby | |
| # List all keys stored in memcache. | |
| # Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
| require 'net/telnet' | |
| headings = %w(id expires bytes cache_key) | |
| rows = [] |
| $$$ = {}; | |
| $$$.ui = {}; | |
| $$$.ui.createImageView = function(options){ | |
| var ui = Ti.UI.createImageView(options); | |
| // 画像を永続化してキャッシュ | |
| ui.imageWithCache = function(url){ | |
| url = url.replace(/\?[0-9]+$/,''); |