Skip to content

Instantly share code, notes, and snippets.

View sadiqmmm's full-sized avatar

Mohammed Sadiq sadiqmmm

View GitHub Profile

Add puma to you Gemfile:

gem "puma"

Install Puma Gem

change to project directory
bundle install
@sadiqmmm
sadiqmmm / 1 SETUP Ubuntu 20.04 LTS (DigitalOcean)
Created September 22, 2023 19:31 — forked from VasylShevchenko/1 SETUP Ubuntu 20.04 LTS (DigitalOcean)
Deploy Rails to VPS(Ubuntu 20.04LTS). Nginx mainline + pagespeed, Puma with Jungle, Capistrano3, PostgreSQL, RVM, Certbot
//------ ROOT --------
root# apt-get update
root# apt-get upgrade
// Dependencies
apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev \
libpcre3-dev unzip htop zip
@sadiqmmm
sadiqmmm / paperform-get-form-page-url.js
Last active March 19, 2024 22:53
Get your form’s URL when it’s embedded in another page - With Paperform, you have the capability to automatically retrieve the URL of your form's page, enabling you to discern the origins of your submissions when they're integrated into other web pages. Gain fresh insights into where your customers are completing your forms!
<div data-paperform-id="jwps"></div>
// Note: Please don't change/format the below line no 3. Keep as it is.
<script>(function () { var script = document.createElement('script'); script.src = "https://paperform.co/__embed.min.js"; document.body.appendChild(script); })()</script>
<script>
(function () {
const currentPageUrl = window.location.href;
const form = document.querySelector("[data-paperform-id='jwps']");
// formsubmiturl is your custom Pre-fill key:
form.setAttribute('prefill', "formsubmiturl=" + currentPageUrl);