This file contains hidden or 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
bundle exec unicorn_rails -c config/unicorn.rb -E production -D |
This file contains hidden or 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
sudo fallocate -l 2G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
swapon -s | |
free -m |
This file contains hidden or 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
name: Rails | |
on: push | |
jobs: | |
verify: | |
name: Build | |
runs-on: ubuntu-latest | |
services: | |
postgres: |
This file contains hidden or 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 web3 = require("@solana/web3.js"); | |
console.log("Generate keypair..."); | |
const keypair = web3.Keypair.generate(); | |
console.log("Public Key:", keypair.publicKey.toString()); | |
console.log("Secret Key:", keypair.secretKey); | |
console.log("\n"); | |
console.log("Connect to Solana..."); | |
const connection = new web3.Connection(web3.clusterApiUrl('devnet')); |
This file contains hidden or 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
build: | |
docker compose build | |
setup: | |
docker compose run --rm app bin/rails db:setup | |
up: | |
docker compose up | |
stop: |
This file contains hidden or 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
# Init Swarm | |
$ docker swarm init --advertise-addr <IP address of instance> | |
# List machines | |
$ docker-machine ls | |
# Target Local Docker | |
$ eval $(docker-machine env -u) | |
# Target Remote Docker |
This file contains hidden or 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
# dockerfile | |
FROM rust:1.74-slim as builder | |
WORKDIR /usr/src/ | |
COPY . . | |
RUN cargo build --release |