This file contains hidden or 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 json | |
| import csv | |
| import os | |
| # current directory | |
| path = os.getcwd() | |
| # Converts all JSON files in a folder and its subfolders to CSV files | |
| def convert_all_json_to_csv(): | |
| for root, _, files in os.walk(path): |
This file contains hidden or 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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name safetechnology.com.br www.safetechnology.com.br; | |
| index index.php index.html index.htm; | |
| root /var/www/html; |
This file contains hidden or 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
| version: '3' | |
| services: | |
| db: | |
| image: mysql:8.0 | |
| container_name: db | |
| restart: unless-stopped | |
| env_file: .env | |
| environment: | |
| - MYSQL_DATABASE=wordpress |
This file contains hidden or 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
| version: '3' | |
| services: | |
| db: | |
| image: mysql:8.0 | |
| container_name: db | |
| restart: unless-stopped | |
| env_file: .env | |
| environment: | |
| - MYSQL_DATABASE=wordpress |
This file contains hidden or 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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name example.com www.example.com; | |
| location ~ /.well-known/acme-challenge { | |
| allow all; | |
| root /var/www/html; | |
| } |
This file contains hidden or 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 | |
| sudo setenforce 0 | |
| #sudo apt update | |
| # Install Docker | |
| #curl -fsSL https://get.docker.com -o get-docker.sh | |
| #sh get-docker.sh | |
| # Or install Docker rootless | |
| cat <<EOF | sudo sh -x |
This file contains hidden or 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
| # # Converting my LJ7 dict to txt file | |
| pt2fr = {'um': 'un', 'dois': 'deux', 'três': 'trois', 'quatro': 'quatre'} | |
| # using utf-8 due to accented character in pt-br | |
| f = open("pt2fr.txt", encoding='utf-8', mode='w+') | |
| f.write(str(pt2fr)) | |
| f.close() | |
| # getting content to file and storing in a var | |
| with open("pt2fr.txt", encoding='utf-8', mode='r') as file_content: |
This file contains hidden or 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
| document.addEventListener('DOMContentLoaded', (event) => { | |
| //the DOM is ready, we can do what we want! | |
| }) |