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
const controllers = import.meta.glob('../../components/**/index.(js|jsx)', { | |
eager: true | |
}); | |
Object.keys(controllers).forEach(path => { | |
const mod = controllers[path].default; | |
if (mod) { | |
const splittedPath = path.split('/'); | |
const identifier = splittedPath[splittedPath.length - 2]; | |
app.register(identifier, controllers[path].default); |
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
### Keybase proof | |
I hereby claim: | |
* I am benbonnet on github. | |
* I am deemx (https://keybase.io/deemx) on keybase. | |
* I have a public key ASB17ro6GMH93r9zzIH9RYSsdZLgb0UplwE2VT2z334Iywo | |
To claim this, I am signing this object: |
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
ACTIONS = %i[index get create update] | |
class BaseClass; end | |
class ObjectEngine | |
attr_reader :item, :schema | |
def initialize(item) | |
@item = item | |
# @schema = item.application.schema | |
end |
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 createPgInstance() { | |
export BASE_PATH=$HOME/postgres-storage; | |
export INSTANCES_COUNT=$(find $BASE_PATH -maxdepth 1 -type d | wc -w); | |
export PORT=$1 | |
export PG_USERNAME=$2 | |
export PG_PASSWORD=$3 | |
export DBNAME=postgres$PORT | |
export INSTALLFOLDER=$BASE_PATH/$DBNAME/data; | |
export LOG_FOLDER=$BASE_PATH/$DBNAME/$DBNAME.log; | |
export SYSTEMDFILE=/etc/systemd/system/$DBNAME.service; |
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 createRedisInstance() { | |
export BASE_PATH=$HOME/redis-storage; | |
export INSTANCES_COUNT=$(sudo find $BASE_PATH -maxdepth 1 -type d | wc -w); | |
export PORT=$1 | |
export REDIS_PASSWORD=$2 | |
export DBNAME=redis$PORT; | |
export INSTALLFOLDER=$BASE_PATH/$DBNAME; | |
export CONFIGFILE=$INSTALLFOLDER/redis.conf; | |
export SYSTEMDFILE=/etc/systemd/system/$DBNAME.service; | |
export PIDFILE=$INSTALLFOLDER/redis.pid; |
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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
upstream railsapp { | |
server unix:///path/to/app/shared/tmp/sockets/puma.sock; | |
} | |
location / { | |
proxy_pass http://railsapp; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto https; |
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
require 'graphql' | |
require 'awesome_print' | |
######### | |
# TYPES # | |
######### | |
module Types | |
class BaseObject < GraphQL::Schema::Object | |
end |
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
export DOMAIN=docker-metal.ngx.host | |
export APP_ADDRESS=localhost:8080 | |
docker run -d \ | |
--name nginx-auto-ssl \ | |
--restart on-failure \ | |
--network host \ | |
-e ALLOWED_DOMAINS="$DOMAIN" \ | |
-e SITES="$DOMAIN=$APP_ADDRESS" \ | |
-v ssl-data:/etc/resty-auto-ssl \ |
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
# Source : https://mherman.org/blog/setting-up-a-kubernetes-cluster-on-ubuntu/ | |
# on all nodes | |
sudo apt-get update && sudo apt-get install -y apt-transport-https | |
curl -s https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
sudo apt update && sudo apt install -qy docker-ce | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list | |
sudo apt-get update && sudo apt-get install -y kubeadm kubelet kubectl |
NewerOlder