Reference: https://blog.golang.org/using-go-modules
export GOPRIVATE=private.com
export GO111MODULE=on
| development: | |
| adapter: mysql2 | |
| enccoding: utf8mb4 | |
| charset: utf8mb4 | |
| collation: utf8mb4_general_ci | |
| reconnect: false | |
| database: app_db | |
| pool: 5 | |
| username: root | |
| password: admin |
| ActiveSupport.on_load :active_record do | |
| module ActiveRecord::ConnectionAdapters | |
| class AbstractMysqlAdapter | |
| def create_table_with_innodb_row_format(table_name, options = {}) | |
| table_options = options.merge(:options => 'ENGINE=InnoDB ROW_FORMAT=DYNAMIC') | |
| create_table_without_innodb_row_format(table_name, table_options) do |td| | |
| yield td if block_given? | |
| end | |
| end | |
| alias_method_chain :create_table, :innodb_row_format |
| 6018 | Books | |
|---|---|---|
| 6000 | Business | |
| 6022 | Catalogs | |
| 6017 | Education | |
| 6016 | Entertainment | |
| 6015 | Finance | |
| 6023 | Food and Drink | |
| 6014 | Games | |
| 6013 | Health and Fitness | |
| 6012 | Lifestyle |
| every 1.day, at: '15:01 pm' do | |
| runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log' | |
| end | |
| every(1.day, at: '0:07 am') { runner 'Tasks::CreateDetailReports.new.execute', output: 'log/cron.log' } | |
| every 1.hours do | |
| runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log' | |
| end |
| # ユーザーの入力が1ならBarから、そうでなければBazから派生する | |
| class Foo < (user_input == "1" ? Bar : Baz) | |
| end |
| var json = (function () { | |
| var json = null; | |
| $.ajax({ | |
| 'async': false, | |
| 'global': false, | |
| 'url': 'http://localhost:8888/indkrydsning/app/house/stats_json/', | |
| 'dataType': "json", | |
| 'success': function (data) { | |
| json = data; | |
| } |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| "encoding/json" | |
| ) | |
| func StructToMap(data interface{}) map[string]interface{} { |
| { | |
| "mappings": { | |
| "shop": { | |
| "properties": { | |
| "id": { | |
| "type": "integer" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, |
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "crypto" | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/base64" |
Reference: https://blog.golang.org/using-go-modules
export GOPRIVATE=private.com
export GO111MODULE=on