- caddy-*: http server related files
- v2ray-*: v2ray related files
- forword-*: files to relay requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# host supply IP | |
# -t(tags) run specific tasks ie. db=master, dbslave=slave1/2, promote=update slave to master, remove= remove host | |
# ansible-playbook pg.yml -e "host=192.169.99.2 -t db ##Build Master | |
# ansible-playbook pg.yml -e "host=192.168.99.3" -t dbslave ##Build Slave | |
# ansible-playbook pg.yml -e "host=192.168.99.3" -t promote ##Promoe slave to master | |
# ansible-playbook pg.yml -e "host=192.168.99.2" -t remove ##Remove node from cluster | |
# ansible-playbook /var/lib/pgsql/pg.yml -e "host=192.168.99.4" -s -t db --user=user1 --ask-sudo-pass ##Ubuntu | |
# Created Bimal Patel | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unset latest_version_on_github | |
unset current_version_on_router | |
main() | |
{ | |
find_out_what_os_we_work_in | |
find_out_what_version_is_here | |
find_out_what_version_is_on_github | |
if compare_version | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
import sys | |
import types | |
import unittest.mock | |
from typing import Any | |
from typing import Callable | |
from typing import Generator | |
from typing import Optional | |
from typing import TYPE_CHECKING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"last_node_id": 152, | |
"last_link_id": 387, | |
"nodes": [ | |
{ | |
"id": 11, | |
"type": "VAEDecode", | |
"pos": [ | |
4250, | |
-150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Download SD's models, loras, textual inversions to Runpod's machine | |
# Checkpoints | |
cd /workspace/stable-diffusion-webui/models/Stable-diffusion | |
wget -O AbsoluteReality.safetensors https://civitai.com/api/download/models/132760?type=Model&format=SafeTensor&size=pruned&fp=fp16 | |
wget -O RealisticVision-v51.safetensors https://civitai.com/api/download/models/130072?type=Model&format=SafeTensor&size=full&fp=fp16 | |
wget -O CyberRealistic.safetensors https://civitai.com/api/download/models/114429?type=Model&format=SafeTensor&size=pruned&fp=fp32 | |
wget -O EpicRealism.safetensors https://civitai.com/api/download/models/127742?type=Model&format=SafeTensor&size=pruned&fp=fp16 | |
wget -O MajicMIX.safetensors https://civitai.com/api/download/models/94640?type=Model&format=SafeTensor&size=pruned&fp=fp16 | |
wget -O URPM.safetensors https://civitai.com/api/download/models/15640?type=Model&format=SafeTensor&size=full&fp=fp16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pacific/Kiritimati , cc: KI , offset: 50400 (14 hours) , comments: Line Islands | |
name: Pacific/Chatham , cc: NZ , offset: 49500 (13.75 hours) , comments: Chatham Islands | |
name: Pacific/Fakaofo , cc: TK , offset: 46800 (13 hours) , comments: | |
name: Antarctica/South_Pole , cc: AQ , offset: 46800 (13 hours) , comments: Amundsen-Scott Station, South Pole | |
name: Antarctica/McMurdo , cc: AQ , offset: 46800 (13 hours) , comments: McMurdo Station, Ross Island | |
name: Pacific/Tongatapu , cc: TO , offset: 46800 (13 hours) , comments: | |
name: Pacific/Enderbury , cc: KI , offset: 46800 (13 hours) , comments: Phoenix Islands | |
name: Pacific/Apia , cc: WS , offset: 46800 (13 hours) , comments: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BinaryNode: | |
__slots__ = ("value", "left", "right") | |
def __init__(self, value=None, left=None, right=None): | |
self.value = value | |
self.left = left | |
self.right = right | |
def __repr__(self): | |
return f"<BinaryNode value={self.value}; {1 if self.left else 0 + 1 if self.right else 0} children>" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
text=$(cat -) | |
request="{ | |
'input':{ | |
'ssml':'<speak>$text</speak>' | |
}, | |
'voice':{ | |
'languageCode':'en-gb', | |
'name':'en-GB-Wavenet-D', |
NewerOlder