This file contains 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
<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> |
This file contains 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
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 |
This file contains 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
rails new project -d postgresql -SJT --skip-spring --skip-turbolinks -m template.rb |
This file contains 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
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 |
This file contains 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
# 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} |
This file contains 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
echo $ES_ENDPOINT |
This file contains 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
#!/bin/bash | |
# setup | |
# source: https://gist.github.com/goosys/8f8d6db86325ea6e8ad6315f037addd5 | |
sh -c "$(curl -fsSL https://gist.githubusercontent.com/goosys/8f8d6db86325ea6e8ad6315f037addd5/raw/18ef6cf38a4c8add4515c20a73c8dbe89f385433/setup.sh)" |
This file contains 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
------------------------ all skip | |
"Material" | |
:save | |
{} | |
:commit | |
{} | |
:update | |
{} | |
------------------------ no skip |
This file contains 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
function CompatibilityCheck() { | |
hasWebGL ? mobile ? confirm("Please note that Unity WebGL is not currently supported on mobiles. Press Ok if you wish to continue anyway.") || window.history.back() : -1 == browser.indexOf("Firefox") && -1 == browser.indexOf("Chrome") && -1 == browser.indexOf("Safari") && (confirm("Please note that your browser is not currently supported for this Unity WebGL content. Try installing Firefox, or press Ok if you wish to continue anyway.") || window.history.back()) : (alert("You need a browser which supports WebGL to run this content. Try installing Firefox."), | |
window.history.back()); | |
} | |
function SetFullscreen(a) { | |
if ("undefined" == typeof JSEvents) return void console.log("Player not loaded yet."); | |
var b = JSEvents.canPerformEventHandlerRequests; | |
JSEvents.canPerformEventHandlerRequests = function() { | |
return 1; |
This file contains 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
module Rack | |
class GzipHeader | |
def initialize(app, options = {}) | |
@app = app | |
@start_with = options[:start_with] || '/' | |
@end_with = options[:end_with] || '.gz' | |
end | |
def call(env) |