Skip to content

Instantly share code, notes, and snippets.

AWSTemplateFormatVersion: 2010-09-09
Metadata:
'AWS::CloudFormation::Designer':
4a374b90-9843-4f6a-a376-654dde1deb83:
size:
width: 60
height: 60
position:
x: 110
'y': 120
aaa
bbb
ccc
AWSTemplateFormatVersion: 2010-09-09
Metadata:
'AWS::CloudFormation::Designer':
f4584f57-70c6-4f93-912b-8035bca539de:
size:
width: 60
height: 60
position:
x: 420
'y': 110
@goosys
goosys / bitnami-apps-vhosts.conf
Last active March 31, 2020 15:27
LightsailのWordpressにLet's EncryptでSSLを設定し自動更新する
<VirtualHost *:80>
ServerName tarumae.tech
<IfModule rewrite_module>
RewriteEngine On
LogLevel alert rewrite:trace3
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !(^/.well-known/)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
default: &default
# adapter: postgresql
encoding: utf-8
# URL
url: <%= ENV.fetch('DATABASE_URL','postgresql://postgres:postgres@localhost:5432') %>
database: <%= ENV.fetch('DATABASE_BASENAME', 'project') + '_' + Rails.env %>
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
rails new project -d postgresql -SJT --skip-spring --skip-turbolinks -m template.rb
@goosys
goosys / Dockerfile.development
Created September 6, 2018 13:37
DockerCompose-Rails
FROM ruby:2.5.1
RUN apt-get update && apt-get install -y postgresql-client --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn --no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV RAILS_VERSION 5.1.4
# frozen_string_literal: true
# @see https://github.com/rails/rails/blob/5-2-0/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb
module ActiveRecord
module ConnectionAdapters
module PostgreSQL
module OID # :nodoc:
class Uuid < Type::Value # :nodoc:
# ACCEPTABLE_UUID = %r{\A(\{)?([a-fA-F0-9]{4}-?){8}(?(1)\}|)\z}
@goosys
goosys / a.sh
Created December 8, 2016 19:12
a
echo $ES_ENDPOINT
@goosys
goosys / UserData.sh
Last active November 16, 2017 08:28
ec2-setup-base
#!/bin/bash
# setup
# source: https://gist.github.com/goosys/8f8d6db86325ea6e8ad6315f037addd5
sh -c "$(curl -fsSL https://gist.githubusercontent.com/goosys/8f8d6db86325ea6e8ad6315f037addd5/raw/18ef6cf38a4c8add4515c20a73c8dbe89f385433/setup.sh)"