Skip to content

Instantly share code, notes, and snippets.

View techwebdev's full-sized avatar
💻
Focusing

techwebdev

💻
Focusing
View GitHub Profile
@techwebdev
techwebdev / export_and_upload_to_s3.sh
Created January 15, 2021 19:03 — forked from neerajgupta2407/export_and_upload_to_s3.sh
Export POstgres db bbackup and upload to S3.
#!/bin/bash
# Written 2018-11-15 by 4410287
# This script will create a backup file of a postgres database and compress it. It is capable of access a local or remote server to pull the backup. After creating a new backup, it will delete backups that are older than 15 days, with the exception of backups created the first of every month. It is recommended to create a seperate database user specifically for backup purposes, and to set the permissions of this script to prevent access to the login details. Backup scripts for different databases should be run in seperate folders or they will overwrite each other.
HOSTNAME=
USERNAME=
PASSWORD=
DATABASE=
FILENAME=$(date +%Y-%m-%d).backup.sql
@techwebdev
techwebdev / PaytmChecksum.py
Created January 15, 2021 19:03 — forked from neerajgupta2407/PaytmChecksum.py
Paytm python sample code
import base64
import string
import random
import hashlib
import sys
from Crypto.Cipher import AES
iv = '@@@@&&&&####$$$$'
export APP_MOUNT_URI=/dashboard/
export API_URI=http://3.6.136.178:8000/graphql/
cd /home/ubuntu/codes/backend/storefront && npm start
export APP_MOUNT_URI=/dashboard/
export API_URI=http://3.6.136.178:8000/graphql/
cd /home/ubuntu/codes/backend/saleor-dashboard && npm start
# Update below variables in ~/.bashrc file.
# change below x.x.x.x to your server ip or 127.0.0.1 for localhost
export ALLOWED_HOSTS=x.x.x.x
export ALLOWED_CLIENT_HOSTS=x.x.x.x
export DEBUG=True
export SECRET_KEY=123456
export INTERNAL_IPS=127.0.0.1,x.x.x.x,
export DEFAULT_COUNTRY=IN
export DEFAULT_CURRENCY=INR
export APP_MOUNT_URI=/dashboard/
# setup storefront
git clone https://github.com/mirumee/saleor-storefront.git
cd saleor-storefront
git checkout 2.10.1
npm i
vim package.json : --host 0.0.0.0
npm start
{"lastUpload":"2021-06-20T11:08:47.616Z","extensionVersion":"v3.4.3"}
@techwebdev
techwebdev / node_nginx_ssl.md
Created November 6, 2020 18:51 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user