DASH是由IFTTT不久前公布的一个开发环境设置工具,它使用了docker-compose,docker-machine和Ansible作为基础,安装非常简单,只需要执行它的bootstrap脚本就可以喝杯咖啡等它设置完成。
这个工具的主要功能是辅助开发容器化的应用程序,比如之前你使用了docker-compose配置过的项目,他能帮你配置本地的nginx和dnsmasq帮你把自定义域名重定向到你的应用,这样就可以不用在设置docker-compose的时候把nginx的单独配置放到docker-compose.yml里面。
- Homebrew with XCode Command Line Tools
- Homebrew Cask
Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.
The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.
A list of useful tools
// Bonfire: Exact Change | |
// Author: @vmlinz | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-exact-change?solution=function%20drawer(price%2C%20cash%2C%20cid)%20%7B%0A%20%20var%20cashes%20%3D%20%5B%5B%22PENNY%22%2C%200.01%5D%2C%20%5B%22NICKEL%22%2C%200.05%5D%2C%20%5B%22DIME%22%2C%200.10%5D%2C%20%5B%22QUARTER%22%2C%200.25%5D%2C%20%5B%22ONE%22%2C%201.00%5D%2C%20%5B%22FIVE%22%2C%205.00%5D%2C%20%5B%22TEN%22%2C%2010.00%5D%2C%20%5B%22TWENTY%22%2C%2020.00%5D%2C%20%5B%22ONE%20HUNDRED%22%2C%20100.00%5D%5D.reduce(function%20(hash%2C%20elem%2C%20index)%20%7B%0A%20%20%20%20hash%5Belem%5B0%5D%5D%20%3D%20elem%5B1%5D%3B%0A%20%20%20%20return%20hash%3B%0A%20%20%7D%2C%20%7B%7D)%3B%0A%20%20var%20change%3B%0A%20%20%2F%2F%20Here%20is%20your%20change%2C%20ma%27am.%0A%20%20var%20result%20%3D%20cash%20-%20price%3B%0A%20%20var%20total%20%3D%20cid.reduce(function%20(p%2C%20c)%20%7B%0A%20%20%20%20return%20p%20%2B%20c%5B1%5D%3B%0A%20%20%7D%2C%200.0).toFixed(2)%3B%0A%0A%20%20if%20(result%20%3E%20total)%0A%20%20%20%20return%20 |
class User < ActiveRecord::Base | |
attr_accessor :upload_secure_token | |
... | |
end |
class User < ActiveRecord::Base | |
validates :auth_token, uniqueness: true | |
before_validation :downcase_email | |
before_create :generate_authentication_token! | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
def generate_authentication_token! |
bundle config build.eventmachine --with-cppflags=\"-I/usr/local/opt/openssl/include\" --with-ldflags=\"-L/usr/local/opt/openssl/lib\" |
https://zespia.tw/blog/2015/01/21/continuous-deployment-to-github-with-travis/ |
A base template for deploying Rails applications.
The following versions are very important to keep in mind. We've done this because we think that the Ruby, Rails and ORM type and versions are the ones that apply the most constraints to a starter template.
- Ruby 2.2.0