Skip to content

Instantly share code, notes, and snippets.

View sidd82's full-sized avatar

Ramkrishna Pednekar sidd82

  • Smaint Solutions
  • Mumbai
View GitHub Profile
Here's how to execute a function on a long press of a Chakra UI card in your Next.js project. We'll use a combination of React's event handlers and a custom hook to handle the long press behavior:
1. Install Necessary Packages
If you haven't already, install Chakra UI in your Next.js project:
Bash
npm install @chakra-ui/react @emotion/react @emotion/styled framer-motion
Use code with caution.
@sidd82
sidd82 / puppeteer-ubuntu-1804.md
Created October 2, 2022 09:04 — forked from luisca-dev/puppeteer-ubuntu-1804.md
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
certbot - certbot script documentation
usage:
certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. The most common SUBCOMMANDS and flags are:
obtain, install, and renew certificates:
@sidd82
sidd82 / onesignal-node.js
Created September 1, 2021 11:28 — forked from mulhoon/onesignal-node.js
Send a push notification in node with OneSignal
var request = require('request');
var sendMessage = function(device, message){
var restKey = '****';
var appID = '****';
request(
{
method:'POST',
uri:'https://onesignal.com/api/v1/notifications',
headers: {
@sidd82
sidd82 / node_nginx_ssl.md
Last active December 14, 2023 09:52 — 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

2. Create a droplet and log in via ssh

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

3. Install Node/NPM