Skip to content

Instantly share code, notes, and snippets.

@shniranjan
shniranjan / _README.md
Created Feb 26, 2022 — forked from mob-sakai/_README.md
Run shell script on gist
View _README.md

Run shell script on gist

Shells that support process substitution such as bash and zsh allow to run shell script on gist as follows.

# With curl:
bash <(curl -sL ${GIST_URL}) args...

# With wget:
@shniranjan
shniranjan / nginx.conf
Created Jan 16, 2022 — forked from ulyssesr/nginx.conf
Nginx RTMP Setup
View nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@shniranjan
shniranjan / certificate.conf
Created Jul 15, 2021
The root-ca conf file follows. You can edit this file to become the sub-ca .conf. Change the directory variable and the policy
View certificate.conf
[ca]
#/root/ca/root-ca/root-ca.conf
#see man ca
default_ca = CA_default
[CA_default]
dir = /root/ca/root-ca
certs = $dir/certs
crl_dir = $dir/crl
new_certs_dir = $dir/newcerts
View generate_bitcoin_address.sh
#!/bin/bash
#
# This is free and unencumbered software released into the public domain.
#
# Requires bc, dc, openssl, xxd
#
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z})
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$"
@shniranjan
shniranjan / face_cropper.py
Created Jan 13, 2021 — forked from tilfin/face_cropper.py
Face detect and crop by using OpenCV
View face_cropper.py
import cv2
import sys
import os
class FaceCropper(object):
CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml"
def __init__(self):
self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH)
View Shell Scripting Tutorials
I. Intro
1. A shell script contains commands that are executed as if you typed them in the terminal.
2. We'll be using Vim for this tutorial
a. Install Vim : sudo apt-get install vim
b. Vim Commands
View keybase.md

Keybase proof

I hereby claim:

  • I am shniranjan on github.
  • I am shniranjan (https://keybase.io/shniranjan) on keybase.
  • I have a public key ASDjRC0JXabKfoyumOIEJ83UCuqM9w3zXDn4bf3PKie_hwo

To claim this, I am signing this object: