python3 -m venv venv
source venv/bin/activate
mkdir python
| curl -i -H "Origin: http://YOUR-SITE-URL" http://S3-or-CLOUDFRONT-URL | grep Access |
| version: "3.3" | |
| services: | |
| ghost: | |
| image: ghost:latest | |
| restart: always | |
| ports: | |
| - "2368:2368" | |
| depends_on: | |
| - db | |
| environment: |
python3 -m venv venv
source venv/bin/activate
mkdir python
| """ | |
| Moralis provides a great funstionality where they provide you a mongoDb instance to save events data from blockchain | |
| blocks. The interface to listen to events is pretty easy as compared to other solutions like Graph or writing your own | |
| sockets code The other great functionality which moralis provides is that you can run your own local EVM blockchain and | |
| sync it with the remore moralis mongodb instance and save all the events data in mongodb | |
| The small issue is: Whenever you redeploy your code or make changes to events, |
| from py_avataaars import PyAvataaar | |
| def generate_mock_user_details(path, name): | |
| avatar = pa.PyAvataaar( | |
| style=pa.AvatarStyle.TRANSPARENT, | |
| skin_color=pa.SkinColor[random.choice([i.name for i in pa.SkinColor])], | |
| hair_color=pa.HairColor[random.choice([i.name for i in pa.HairColor])], | |
| facial_hair_type=pa.FacialHairType[random.choice([i.name for i in pa.FacialHairType])], | |
| facial_hair_color=pa.HairColor[random.choice([i.name for i in pa.HairColor])], | |
| top_type=pa.TopType[random.choice([i.name for i in pa.TopType])], |
| #copied from https://gist.github.com/jdkanani/e18e14910652ad829fad994e4b89f0b9/raw/036bec312799cec8589360d0d939cc5ec0e7f719/go-install.sh | |
| #!/bin/bash | |
| set -e | |
| VERSION="1.15.5" |
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon |
| import inspect | |
| import importlib | |
| import ast | |
| import glob | |
| files = glob.glob("/Users/dot/Programs/python_programs/dgm-web-app/backend" + '/**/*.py', recursive=True) | |
| class CountFunc(ast.NodeVisitor): | |
| func_count = 0 |
| trait Draw { | |
| fn draw(&self) -> &'static str; | |
| } | |
| pub struct Button { | |
| pub width: u32, | |
| pub height: u32, |