Skip to content

Instantly share code, notes, and snippets.

View prasathmani's full-sized avatar
💻
<Coding... />

Prasath Mani prasathmani

💻
<Coding... />
View GitHub Profile
@prasathmani
prasathmani / http.ts
Last active June 13, 2024 10:57
Axios HTTP Client Using TypeScript | Axios Wrapper TypeScript
/**
* http.ts
* author by @ccpprogrammers
*/
import axios, {
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
InternalAxiosRequestConfig,
@prasathmani
prasathmani / GoDaddy-acme.sh
Created February 16, 2020 13:33
LetsEncrypt SSL cert on GoDaddy Shared Hosting using acme.sh
pre required SSH access
## Download and install acme.sh
acme.sh is a full implementation of a LetsEncrypt client but that doesn't depend on Python/pip/virtualenv/etc, and that doesn't require root -- exactly what we need, since we don't have root an a shared GoDaddy server, and we can't install new software outside of our home directory.
`curl https://get.acme.sh | sh`
Now log out and SSH back in so acme.sh's install is complete in every way (include the Bash alias).
##Get GoDaddy API Key
Visit `https://developer.godaddy.com/keys/`
@prasathmani
prasathmani / upload-to-google-drive.py
Last active September 10, 2024 00:04
upload files to google drive using python
import requests, json
# Get refresh token from google drive api
# Generating a refresh token for DRIVE API calls using the OAuth playground
# https://www.youtube.com/watch?v=hfWe1gPCnzc
def getToken():
oauth = 'https://www.googleapis.com/oauth2/v4/token' # Google API oauth url
headers = {'content-type': 'application/x-www-form-urlencoded'}
data = {
'grant_type': 'refresh_token',