Skip to content

Instantly share code, notes, and snippets.

View dattasaurabh82's full-sized avatar

Saurabh Datta dattasaurabh82

View GitHub Profile
@dattasaurabh82
dattasaurabh82 / git_repo_sync.md
Last active March 21, 2024 01:00
Steps to sync between to separate private repos and deploy a web-app in gh-pages

Context:

Imagine you are making small webapp to control a hardware protoytpe.
It is part of a set of internal tools and utilities that you are building for a bigger project, to aid you in testing or something else.

This repo, since it is a client project, is private.
Now, let's say the private git repo, you are maintaining those utilities is hosted in github as: github.com/user/utility_repo

At some point you want to make the web-app go live, you don't want to bother working on a bare-metal VPS, you want to just simply use gh-pages because it provides ssl support out of the box, it's simple, lean and gets the job done, while your repo still remains private.

Description:

  1. Setup Shopify Store and focus on store settings for online store only.
  2. Specifically focus on Checkout, Markets, Zones, Shipment, tax details etc.
  3. We are only using Shopify API for checkout and order fulfilment and not the whole store. Meaning, customers will only see our custom coded website and will only see the Shopify checkout UI during checking out.

Things to ignore:

  1. Ignore Product details: I have setup the product information correctly. No need to ask further question. We have 1 product with the correct variations and price.
  2. Ignore Shop theme and design: We do not need that as we are only using Shopify API to connect to our own custom coded web shop. WE ARE NOT USING SHOPIFY STORE FRONT END.
  3. We do not need shop pay.
  4. Ignore Billing Settings
# The screenshots I took, have resolutions 144x144
# The screenshots I took, have dimensions 2990x2080

# I combined all the front images  and back images of PCB separately into 2 separate videos, each with framerate 8 
ffmpeg -r 8 -f image2 -s 144x144 -i picf%04d.png -vcodec libx264 -crf 15  -pix_fmt yuv420p wf.mp4
ffmpeg -r 8 -f image2 -s 144x144 -i picb%04d.png -vcodec libx264 -crf 15  -pix_fmt yuv420p wb.mp4
# changed the resolutions
ffmpeg -i wf.mp4 -vf scale=2990:2080 -preset slow -crf 18 wfrs.mp4
ffmpeg -i wb.mp4 -vf scale=2990:2080 -preset slow -crf 18 wbrs.mp4
@dattasaurabh82
dattasaurabh82 / CH340N_linux_fix.md
Last active March 19, 2024 11:41
Fix Driver issues for CH340N usb serial chip in Linux (Ubuntu 22.04)

Tested on Ubuntu 20, 21 earlier and they were not working. So upgraded Ubutbu to latest 22 version.

The issue is: The built in Kernals of Ubuntu and many Linux Kernals (between ) have the CH340 drivers broken / have bugs and not fixed (from kernal 5.4.0-87 and above)

Note: I didn't try on linux kernal 5.4.0-86 my self. I though I will see how is the situation in the latest linux kernal (as of 16/05/2022)

Instructions for Ubuntu 22.04 LTS x86_64

@dattasaurabh82
dattasaurabh82 / x11vnc server setup.md
Created May 16, 2022 04:19
x11vnc server setup on Ubuntu

Install x11 vnc server

sudo apt-get update -y
sudo apt-get install x11vnc net-tools -y
sudo apt-get install lightdm -y

Make default Desktop as Xorg rather than Wayland

As x11vnc uses DISPLAY created by Xorg

sudo nano /etc/gdm3/custom.conf
@dattasaurabh82
dattasaurabh82 / setup.txt
Last active February 9, 2024 16:43
Setup waveshare 7.9" [400x1280] touchscreen display on Intel NUC running Ubuntu20.04 LTS desktop
DISPLAY: https://www.waveshare.com/wiki/7.9inch_HDMI_LCD
Connect the USB touch & power of the display's uUSB to any USB port of the Intel NUC machine.
Connect the HDMI INPUT for the display through a thunderbolt 3 -> HDMI adapater to the NUC
Connect your primary display to the NUC's main HDMI output.
In display settings of Ubuntu's Settings, arrange your display orintation and position according to your needs.
My setup involved to set it up in "Left Portrait" mode.
The display timing are automatically recognized by Ubuntu if this display is attached to the Thunderbolt 3 as secondary display.
Note: If you attach the waveshare display to the rpimary HDMI of NUC, it won't work and will appear glitchy..
@dattasaurabh82
dattasaurabh82 / Private git and deployment server.md
Last active September 10, 2018 10:15
Create your own private git server, make it accessible outside local network and deploy your own private node apps.

Personal Git and Deployment SERVER setup with access outside network

Hardware used (My personal basic setup):

  1. raspberry pi zero w (You can choose any debian based basic server hardware like old ubuntu machine etc.)
  2. Dell 1TB external USB harddrive
  3. BerryBoot to install latest raspbian in ext HDD and let pi boot from there rather than SD card.
  4. It is connected to my VPN router with LAN cable and wifi is disabled.

1.Dependency installs: