Straight to Maintenance
Initialize the droplet with dokku app pre-setup
| #!/usr/bin/env ruby | |
| # Pass in the name of the site you wich to create a cert for | |
| domain_name = ARGV[0] | |
| if domain_name == nil | |
| puts "Y U No give me a domain name?" | |
| else | |
| system "openssl genrsa -out #{domain_name}.key 1024" | |
| system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'" |
Initialize the droplet with dokku app pre-setup
####Rets Rabbit http://www.retsrabbit.com
Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.
| json.extract! photo, :id, :image_data, :created_at, :updated_at | |
| json.url photo_url(photo, format: :html) | |
| json.image_url image_url_photo_url(photo) |
| #postgresql setup | |
| ssh -i ~/.ssh/id_rsa root@<domain> | |
| dokku postgres:connect <db> | |
| psql=# SHOW config_file; | |
| -> /var/lib/postgresql/data/postgresql.conf | |
| psql=# \q | |
| docker ps |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Mautic Form Test</title> | |
| <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
| <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test| <%= form_with(model: billboard) do |form| %> | |
| <%= tag.div class: "dropzone", data: { controller: "dropzone", dropzone_param_name_value: "billboard[images][]", dropzone_url_value: rails_direct_uploads_url, dropzone_accepted_files_value: "image/*", dropzone_max_files_value: 3, dropzone_max_filesize_value: 0.300 } do %> | |
| <div class="dz-default dz-message flex flex-col items-center"> | |
| <%= image_tag "upload.svg", size: 28, class: "colorize-black", aria: { hidden: true } %> | |
| <h5 class="font-semibold mbs-4">Drop files here or click to upload.</h5> | |
| <p class="text-sm text-subtle">Upload up to 10 files.</p> | |
| </div> | |
| <% end %> | |
| <div class="inline-flex items-center mbs-2 mie-1"> |
The file _functions-override.scss contains the custom functions to handle color conversions within sass and bootstrap.
Bootstrap does not like its sass variables set to css custom properties, e.g. var(--primary). If you use the code snippets below, you can do so, under some conditions.
In the most basic case, you should provide your color variables using the hsl format.
If you insert this using javascript, you can use the script apply-colors.jsx to let js handle the conversion from hex or rgb to hsl.
Reference the main.scss file to import the files in the correct order.