Skip to content

Instantly share code, notes, and snippets.

View itsTeknas's full-sized avatar
🚀
Launching Startups

Sanket Berde itsTeknas

🚀
Launching Startups
View GitHub Profile
@itsTeknas
itsTeknas / README.md
Last active April 15, 2023 15:32
Sonarqube + Postgres + Traefik with auto SSL

Sonarqube Docker Compose Setup

sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
loginctl enable-linger $USER
@itsTeknas
itsTeknas / upload.py
Created October 2, 2021 15:38
Upload a file to AWS S3 with multipart uploads using the boto3 python client.
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html
import boto3
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html
s3Client = boto3.client('s3')
s3 = boto3.resource('s3')
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.create_multipart_upload
multipart_upload = s3Client.create_multipart_upload(
ACL='public-read',
@itsTeknas
itsTeknas / s3-multipart.js
Created September 29, 2021 14:35
Upload a large file to aws s3 using multipart uploads
// npm i --save dotenv aws-sdk
const dotenv = require('dotenv')
const path = require('path')
const fs = require('fs')
const AWS = require('aws-sdk');
dotenv.config({
path: path.join(__dirname, '.env'),
debug: true,
@itsTeknas
itsTeknas / index.html
Created September 1, 2021 17:36
Google Drive File Upload
<!DOCTYPE html>
<html>
<head>
<title>GDrive File Upload</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.0/css/bootstrap.min.css"
integrity="sha512-F7WyTLiiiPqvu2pGumDR15med0MDkUIo5VTVyyfECR5DZmCnDhti9q5VID02ItWjq6fvDfMaBaDl2J3WdL1uxA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
@itsTeknas
itsTeknas / number-to-words.pipe.ts
Created November 12, 2017 06:44
An Angular 4 pipe to convert a number to an equivalent words representation for Indian Rupees.
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'numberToWords'
})
export class NumberToWordsPipe implements PipeTransform {
a = [
'',
'one ',