I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
codes = ['20222','20515','20060','20226','20064','20229','20530','20533','20532','20250','20091','20543','20542','20546','20262','20268','20549','20303','20317','20319','20373','20593','20390','20402','20401','20001','20003','20002','20005','20004','20007','20006','20009','20008','20011','20010','20422','20012','20016','20015','20018','20017','20020','20019','20433','20431','20024','20032','20030','20037','20036','20202','20203','20044','20052','20057','20507','20510','20220','20059','20509'] |
class MyController { | |
editor: any; | |
grapesJsConfig: { | |
//whatever | |
} | |
constructor(private readonly $scope: ng.IScope) {} |
# DB Version: 10 | |
# OS Type: linux | |
# DB Type: web | |
# Total Memory (RAM): 8 GB | |
# CPUs num: 2 | |
# Connections num: 856 | |
# Data Storage: ssd | |
max_connections = 856 | |
shared_buffers = 2GB |
# Finder: show path bar | |
defaults write com.apple.finder ShowPathbar -bool true | |
# Keep folders on top when sorting by name | |
defaults write com.apple.finder _FXSortFoldersFirst -bool true | |
# When performing a search, search the current folder by default | |
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
# Disable the warning when changing a file extension |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
'use strict'; | |
const path = require('path') | |
exports.handler = (event, context, callback) => { | |
//get request object | |
const { request } = event.Records[0].cf | |
const url = request.uri; |
class CreateAddresses < ActiveRecord::Migration | |
def self.up | |
create_table :addresses do |t| | |
t.integer :customer_id | |
t.string :address | |
t.string :city | |
t.string :state | |
t.integer :zip_code | |
t.timestamps | |
end |
nohup sh -c 'mycommand' > /dev/null & |
{ | |
"caret_extra_width": 2, | |
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"folder_exclude_patterns": | |
[ | |
".git", | |
"node_modules" | |
], |
/* | |
* decaffeinate suggestions: | |
* DS102: Remove unnecessary code created because of implicit returns | |
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md | |
*/ | |
const OldHttpRequest = Turbolinks.HttpRequest; | |
Turbolinks.CachedHttpRequest = class CachedHttpRequest extends Turbolinks.HttpRequest { | |
constructor(_, location, referrer) { | |
super(); |