Skip to content

Instantly share code, notes, and snippets.

@alvindaiyan
alvindaiyan / run_webui_on_port_80.sh
Last active December 22, 2023 04:56
Run SD webui on port 80
#!/bin/bash
sudo ./webui.sh -f --listen --port 80 --api --enable-insecure-extension-acces --xformers --no-half-vae
@alvindaiyan
alvindaiyan / sagemaker_endpoint_scaling.py
Created December 14, 2023 06:52
Scaling a Sagemaker Endpoint to 0 and others
import os
import boto3
os.environ.setdefault('AWS_PROFILE', 'playground') # your aws profile name
endpoint_name = 'YOUR_ENDPOINT_NAME' # your endpoint name
if __name__ == '__main__':
sagemaker_client = boto3.client('sagemaker')
ep = sagemaker_client.describe_endpoint(
@alvindaiyan
alvindaiyan / clean_resources.sh
Last active December 26, 2023 03:03
A script to clean all leftovers for sd aws extension
#!/bin/bash
region=$1
account=$(aws sts get-caller-identity --query Account --output text)
RED='\033[0;31m'
Green='\033[0;32m'
Blue='\033[0;34m'
NC='\033[0m' # No Color
@alvindaiyan
alvindaiyan / route53Cert.py
Created August 11, 2022 08:47
Batch add CNAME records to godaddy by python
#!/usr/bin/env python
# Paste <CNAME List> into script below to import all CNAME entry into GoDaddy
# CNAME List input format
# {'CNAME List': "[{'Name': 'xx.example.cn.', 'Type': 'CNAME', 'Value': 'xx.xx.acm-validations.aws.'},
# {'Name': 'xx.example1.cn.', 'Type': 'CNAME', 'Value': 'xx.xx.acm-validations.aws.'},
# {'Name': 'xx.example2.cn.', 'Type': 'CNAME', 'Value': 'xx.xx.acm-validations.aws.'}]
from godaddypy import Client, Account
@alvindaiyan
alvindaiyan / gh-pages-deploy.md
Created October 23, 2017 03:45 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).