Skip to content

Instantly share code, notes, and snippets.

View prathamesh-dukare's full-sized avatar
:electron:
Figuring Out

Prathamesh Dukare prathamesh-dukare

:electron:
Figuring Out
View GitHub Profile
@piyushgarg-dev
piyushgarg-dev / Dockerfile
Created October 21, 2023 10:00
Docker In One Shot
FROM ubuntu
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get upgrade -y
RUN apt-get install -y nodejs
COPY package.json package.json
COPY package-lock.json package-lock.json
@piyushgarg-dev
piyushgarg-dev / README.md
Last active June 15, 2024 19:03
Kafka Crash Course

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. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.

@pallavtrivedi03
pallavtrivedi03 / CertificatePinning.swift
Created September 3, 2021 10:02
Implementation of SSL pinning (using certifcate)
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
guard let serverTrust = challenge.protectionSpace.serverTrust else {
completionHandler(.cancelAuthenticationChallenge, nil);
return
}
let certificate = SecTrustGetCertificateAtIndex(serverTrust, 0)
// SSL Policies for domain name check
let policy = NSMutableArray()
@senthilmurukang
senthilmurukang / stash-copy.sh
Last active May 10, 2024 15:50
shell script to copy stash from one folder to another. Example usage: ./stash-copy.sh /path/to/git/old/folder /path/to/git/new/folder
src=$1
dest=$2
current_directory=$(pwd)
cd $src
stashes=$(git stash list)
IFS=$'\n'
stash_messages=()
for stash in $stashes; do