This file contains hidden or 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
| type TMember = object | |
| proc className(t:typedesc):string = | |
| astToStr(t) | |
| template className2(t: expr):string = | |
| astToStr(t) | |
| echo TMember.className # => t | |
| echo TMember.className2 # => TMember |
This file contains hidden or 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 self.create_personalized | |
| m = Member.find(current_scope.where_values.find {|n| n.left.name == "member_id"}.right) | |
| find_or_create_by_provider(m.name) | |
| end |
This file contains hidden or 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
| production: | |
| adapter: mysql | |
| encoding: utf8 | |
| reconnect: false | |
| database: flowtown_production | |
| pool: 5 | |
| username: root | |
| password: | |
| <%= "password: #{IO.read(ENV["HOME"] + "/config/production_password")}" rescue nil%> |
This file contains hidden or 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
| begin | |
| require 'vlad' | |
| Vlad.load :scm => :git, :app => :passenger | |
| set :web_command, "sudo /etc/init.d/apache2" | |
| set :deploy_to, "/home/deploy/apps/#{vhost}" | |
| namespace :vlad do | |
| remote_task :create_vhost do | |
| conf = "<VirtualHost *:80> |