Skip to content

Instantly share code, notes, and snippets.

View oneamitj's full-sized avatar
💭
he-ya!!!

Amit Joshi oneamitj

💭
he-ya!!!
View GitHub Profile

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@oneamitj
oneamitj / bitbucket_2_github_migrate.sh
Created May 13, 2024 10:42
Migrate repo in BitBucket Organization to GitHub Organization with all branchs and PR.
#!/bin/bash
# Input Variables
BB_ORG="mybborg"
BB_REPO_LIST="repo1,repo2,repo3"
GH_ORG="myghorg"
# Convert comma-separated list of repositories into an array
IFS=',' read -r -a repo_array <<< "$BB_REPO_LIST"
@oneamitj
oneamitj / Dockerfile
Last active March 23, 2024 18:50
WIP: A mock API to be used in place of OpenAI endpoint in Open Web UI
FROM --platform=linux/amd64 python:3-slim as build
RUN pip install boto3
RUN pip install flask
RUN mkdir /app
WORKDIR /app
COPY bedrock_api.py bedrock_api.py
EXPOSE 9090
@oneamitj
oneamitj / aws_cost.py
Last active January 4, 2024 10:23
Get list of services being used in an AWS Account and their corresponding cost.
print("Before running this code make sure AWS account is setup or the env var is there.")
print('''
export AWS_ACCESS_KEY_ID="AS*******
export AWS_SECRET_ACCESS_KEY="u8*****"
export AWS_SESSION_TOKEN="****"
'''
)
prompt = input("***Run the code (Y/n):")
if prompt == 'n':
exit(1)
@oneamitj
oneamitj / lambda_function.py
Created August 10, 2022 16:29
Lambda Function to use as authentication provider with user management from Secret Manager for Transfer Family.
# This code is part of Transfer Family Tutorial: https://aws.amazon.com/blogs/storage/enable-password-authentication-for-aws-transfer-family-using-aws-secrets-manager-updated/
# Full zip with CloudFormation code mentioned on that tutorial: https://s3.amazonaws.com/aws-transfer-resources/custom-idp-templates/aws-transfer-custom-idp-secrets-manager-sourceip-protocol-support-apig.zip
# My step wise spinning up SFTP in Transfer Family with username and password:
import os
import json
import boto3
import base64
from ipaddress import ip_network, ip_address
@oneamitj
oneamitj / submit.md
Created July 30, 2021 07:47 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@oneamitj
oneamitj / github_API
Created May 20, 2021 04:39
A wrapper for GitHub HTTP Repo API
import requests
class GitHub:
def __init__(self, access_token):
self.authorization = 'token {}'.format(access_token)
self.__full_repo_name = None # ex: paxosglobal/pax-contracts
self.__repo = None
@oneamitj
oneamitj / app.tf
Created January 25, 2021 08:29 — forked from joatmon08/app.tf
Terraform Example for Azure App Gateway & App Service
locals {
app_services = [
{
kind = "Linux"
sku = {
tier = "Standard"
size = "S1"
}
},
{
@oneamitj
oneamitj / README.md
Created July 2, 2020 07:21 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@oneamitj
oneamitj / DarkSlack4.md
Last active August 26, 2019 05:01
How to apply dark theme in slack 4? Dark theme for Slack version 4 in MacOS, Windows and Linux (Debian).
  1. Install nodejs and make sure npx -v works
  2. Change dir to /Applications/Slack.app; cd /Applications/Slack.app
  3. The theme css file is packaged in Contents/Resources/app.asar bundle file. We need to unpack it, change theme css and repack.
  4. Unpack sudo npx asar extract Contents/Resources/app.asar Contents/Resources/app.asar.unpacked
  5. Open ssb-interop.bundle.js (contains theme css) from the app.asar.unpacked directory in your favroite text editor. subl Contents/Resources/app.asar.unpacked/dist/ssb-interop.bundle.js
  6. Replace whole content of ssb-interop.bundle.js with custom-ssb-interop.bundle.js attached in this gist.
  7. Repack sudo npx asar pack Contents/Resources/app.asar.unpacked Contents/Resources/app.asar
  8. Restart/Launch Slack

Preview