- Run
docker compose run web bundle && docker compose build
to update your Gemfile.lock before building the image - Gemfile.dev should be nearly identical to Gemfile but also contain development gems such as 'debug' and 'solargraph-rails'
- Dockerfile.dev should be nearly identical to Dockerfile, except for the
FROM
image version,COPY Gemfile.dev Gemfile
,COPY Gemfile.lock Gemfile.lock
, and possibly using the root user - Remember to revert your Gemfile.lock before committing, e.g.
git checkout develop -- Gemfile.lock
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
# NOTE: This process takes ~16 minutes on an M1 Mac | |
# RESOURCES: | |
# - https://www.cyberciti.biz/faq/how-to-create-disk-image-on-mac-os-x-with-dd-command/ | |
# - https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3 | |
# STEPS: | |
# 1.) Download the SteamOS .img.bz2 file from here: https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3 |
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
services: | |
traefik: | |
image: traefik:2.10 | |
command: --api.insecure=true --providers.docker | |
ports: | |
- "80:80" | |
- "8080:8080" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
rails1: |
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
# REQUIREMENTS: | |
# 1.) Your computer must be connected to the same network as the SQL Server, | |
# likely either through VPN or VDI. | |
# 2.) You will need to have the SQL Server driver installed. Admins can install | |
# it directly, but non-admins should be able to install it indirectly by | |
# installing Azure Data Studio. | |
library(DBI) | |
library(odbc) |
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
require 'json' | |
require 'openstruct' | |
require 'yaml' | |
FILE_PATH = '/path/to/file.yml' | |
### LOAD YAML FILE AS A YAML OBJECT ### | |
yaml = YAML.load_file(FILE_PATH) # with string keys | |
yaml = JSON.parse(YAML.load_file(FILE_PATH).to_json, symbolize_names: true) # with symbol keys |
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
# frozen_string_literal: true | |
require 'net/sftp' | |
module Integrations | |
module Google | |
# Upload feed file(s) & fileset descriptor(s) to the Google Partner SFTP dropbox | |
# | |
# @see Google Dropbox SFTP setup: https://support.google.com/youtube/answer/3071034 | |
# |
Use the following command to connect to an SFTP dropbox using public key authentication. Common locations for private key files include ~/.ssh/id_rsa
and ~/.ssh/id_ed25519
.
sftp -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes -o PasswordAuthentication=no -o HostKeyAlgorithms=+ssh-rsa -i /path/to/private/key -P 19321 [email protected]
In the command above, we're using the sftp command with various options:
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
# Create an instance of an AWS S3 resource (bucket) | |
class S3Bucket | |
def self.fetch | |
s3 = Aws::S3::Resource.new( | |
Aws::Credentials.new( | |
Rails.configuration.aws_uploader_access_key_id, | |
Rails.configuration.aws_uploader_secret_access_key | |
), | |
) | |
s3.bucket(Rails.configuration.aws_bucket) |
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
# Zip file | |
# | |
# @private | |
# | |
# @return [String] path to file | |
def zip_file | |
zfilename ||= 'example.zip' | |
zfile ||= Tempfile.new(zfilename) # you can also create a non-temp file so that it's not in the tmp directory | |
Zip::File.open(zfile.path, Zip::File::CREATE) do |zip| | |
['path/to/file1', 'path/to/file2'].each do |filepath| |