By default RAILS_RELATIVE_URL_ROOT
is used only for asset pipeline.
To namespace your rails routes you need to wrap run MyApp::Application
with map
in your config.ru:
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
# 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 | |
--- |
#!/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 |
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 |
{ | |
"last_node_id": 152, | |
"last_link_id": 387, | |
"nodes": [ | |
{ | |
"id": 11, | |
"type": "VAEDecode", | |
"pos": [ | |
4250, | |
-150 |
## 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 |
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: |
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) |
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>" | |