I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.
rails new kamal_pg --css tailwind --skip-test --database=postgresql
cd kamal_pg
# CLI | |
sudo apt update -y | |
sudo apt install -y \ | |
git curl \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ | |
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \ | |
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \ | |
rbenv apache2-utils |
# Load DSL and set up stages | |
require "capistrano/setup" | |
# Include default deployment tasks | |
require "capistrano/deploy" | |
require "capistrano/scm/git" | |
install_plugin Capistrano::SCM::Git |
import React from 'react' | |
import { withRouter, Link } from 'react-router-dom' | |
import { graphql, compose } from 'react-apollo' | |
import { Formik } from 'formik' | |
import Yup from 'yup' | |
import FormWideError from '../elements/form/FormWideError' | |
import TextInput from '../elements/form/TextInput' | |
import Button from '../elements/form/Button' | |
import { H2 } from '../elements/text/Headings' |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require File.dirname(__FILE__) + '/blueprints' | |
require 'faker' | |
require 'rails/test_help' | |
require 'minitest/autorun' | |
require 'minitest/pride' | |
class MiniTest::Unit::TestCase | |
include MiniTest::ActiveRecordAssertions |
require 'net/sftp' | |
SERVER = "127.0.0.0" | |
KEY_FILE = "/tmp/id_rsa" | |
Net::SFTP.start(SERVER, 'huskercane', :keys=>[KEY_FILE]) do |sftp| | |
sftp.mkdir! "/tmp/something" | |
#thats right needs full file name to copy | |
sftp.upload!("/tmp/something/something.txt", "/tmp/something/something.txt") | |
end |
[ | |
{ "keys": ["ctrl+shift+z"], "command": "insert_snippet", "args": {"contents": "<%= ${0:$TM_SELECTED_TEXT} %>"}, "context": | |
[ | |
{ "key": "selector", "operator": "equal", "operand": "text.html, source.yaml, meta.erb" } | |
] | |
}, | |
{ "keys": ["ctrl+alt+x"], "command": "insert_snippet", "args": {"contents": "<% ${0:$TM_SELECTED_TEXT} %>"}, "context": | |
[ | |
{ "key": "selector", "operator": "equal", "operand": "text.html, source.yaml, meta.erb" } | |
] |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
# Edit .bash_profile | |
$ nano ~/.bash_profile | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" |
# Backup Mysql database | |
$ mysqldump -u root -p contracts_production > contracts.sql | |
# Restore Mysql database from sql file | |
$ mysql -u root -p contracts_production < contracts.sql |