https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add in the Terminal.
| # course.rb | |
| # rails g model course title:string | |
| class Course < ActiveRecord::Base | |
| has_and_belongs_to_many :disciplines | |
| scope :programming, -> { | |
| where("title LIKE ?", '%Programming%') | |
| } | |
| end |
| module MyCusthomMethods | |
| def after(action_name, &block) | |
| puts "(before) after action #{action_name}" | |
| instance_eval(&block) | |
| puts "(after) after action #{action_name}" | |
| end | |
| def deploy! |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # @kyletcarlson | |
| # | |
| # This skeleton also assumes you're using the following gems: |
| require 'openssl' | |
| def gen_key(name) | |
| key = OpenSSL::PKey::RSA.new 1048 | |
| file = File.new(name, "w") | |
| file.write(key) | |
| file.close | |
| end | |
| def get_key(name) |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add in the Terminal.
| require 'pry' | |
| require 'json' | |
| require 'uri' | |
| module Application | |
| class NginxLogParser | |
| DEFAULT_FORMAT_REGEXP = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s?\-\s?-\s?\[(\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\]\s?\\?"?(GET|POST|PUT|HEAD|DELETE|OPTIONS)\s?(.*?)\s(HTTP\/\d\.\d)\\?"?\s?(\d{3})\s?(\d+)\s?\\?\"\-\\?\"\s?\\?\"(.*?)\"/i | |
| REQUEST_FORMAT = [ |
| require './documents/base' | |
| require './documents/cpf' | |
| require './documents/cnpj' | |
| module BRDocuments | |
| VERSION = '0.0.1' | |
| end |
Of course I will start this list with one debut album, this self-titled album by SBTRKT(pronounced as "Subtract") is a masterpiece!!!!
A wonderful reunion of great collaborators, most of the songs has Sampa contrib in vocal, when you hear the voice of this guy for the first time, you find yourself addicted to it!
Theres a track called Ready Set Loop, I always read as Read Eval Print Loop(REPL - that kind of interactive shell you have in your programming language, such as irb, node, python, php)
| #!/bin/bash | |
| # | |
| # DROPKICK.SH | |
| # | |
| # Detect and Disconnect the DropCam and Withings devices some people are using to | |
| # spy on guests in their home, especially in AirBnB rentals. Based on Glasshole.sh: | |
| # | |
| # http://julianoliver.com/output/log_2014-05-30_20-52 | |
| # | |
| # This script was named by Adam Harvey (http://ahprojects.com), who also |