Skip to content

Instantly share code, notes, and snippets.

View sanyamsmulay's full-sized avatar
🔨
worlds are built one strike at a time

Sanyam Suhas Mulay sanyamsmulay

🔨
worlds are built one strike at a time
View GitHub Profile
@sanyamsmulay
sanyamsmulay / requirements.txt
Created August 2, 2023 17:17
Google Workspace --> Transfer files and delete user
asttokens==2.2.1
backcall==0.2.0
cachetools==5.3.1
certifi==2023.7.22
charset-normalizer==3.2.0
decorator==5.1.1
executing==1.2.0
google-api-python-client==1.7.9
google-auth==2.22.0
google-auth-httplib2==0.0.3

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@sanyamsmulay
sanyamsmulay / tar-all-folders.sh
Created February 4, 2023 15:57
tar all sub-dirs inside a dir
#!/bin/bash
echo "going to tar all dirs, in this path:" `pwd`
## TODO: ignore files,
## TODO: a flag for managing overwrites
for i in *
do
tar -czvf "$i.tar.gz" "$i"
done
@sanyamsmulay
sanyamsmulay / proxy_express_server.js
Last active January 6, 2023 14:43
gist for express server to serve some registered urls from self and others from proxy
const express = require('express');
const httpProxy = require('http-proxy');
const app = express();
const proxy = httpProxy.createProxyServer();
const port = 3001;
const serverBehindProxy = 'https://a.b.c';
// const serverBehindProxy = 'http://localhost:3000';
const pathsAvailableOnWebsite = {