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
deck -D build/root.build | |
deck -D build/bootstrap | |
rm -rf build/root.spec build/cdroot build/product.iso build/log build/stamps | |
deck /turnkey/fab/bootstraps/bullseye build/bootstrap | |
fab-apply-overlay /turnkey/fab/common/overlays/bootstrap_apt build/bootstrap; | |
fab-chroot build/bootstrap "echo nameserver 8.8.8.8 > /etc/resolv.conf"; | |
fab-chroot build/bootstrap "echo nameserver 8.8.4.4 >> /etc/resolv.conf"; | |
mkdir -p build/bootstrap/usr/local/share/ca-certificates/; | |
# temporarily allow cert to not exist | |
cp /usr/local/share/ca-certificates/squid_proxyCA.crt build/bootstrap/usr/local/share/ca-certificates/ || true; |
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 | |
# This script allows you to chroot ("work on") | |
# the raspbian sd card as if it's the raspberry pi | |
# on your Ubuntu desktop/laptop | |
# just much faster and more convenient | |
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689 | |
# make sure you have issued |
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 logging | |
import os | |
import glob | |
logging.basicConfig(level='DEBUG') | |
logger = logging.getLogger('organizer') | |
SO_IDENTIFY = os.name # posix nt java | |
logger.debug('Operating system %s' %SO_IDENTIFY) |
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 unittest | |
from tibiarequestdata import request_highscores | |
class Testtibiatool(unittest.TestCase): | |
hash_request = [] | |
def test_request_highscores(self): | |
"""Test invalid type world argument""" | |
result = 0 |
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
########### OPÇÃO 01 | |
import requests | |
import sys | |
response = requests.get("https://checker.in/go/8819959", stream=True) | |
with open('file.apk', 'wb') as fileobj: | |
for chunk in response.iter_content(chunk_size=36): | |
fileobj.write(chunk) |
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
""" | |
Conforme descrito pela biblioteca selenium | |
https://selenium-python.readthedocs.io/installation.html | |
Precisamos baixar o webdriver: | |
https://github.com/mozilla/geckodriver/releases | |
1 - Extrair | |
2 - Adicionar ao path |
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 click | |
from flask.cli import with_appcontext | |
from flask_sqlalchemy import SQLAlchemy | |
db = SQLAlchemy() | |
class Role(db.Model): | |
__tablename__ = 'roles' | |
id = db.Column(db.Integer, primary_key=True) | |
name = db.Column(db.String(64), unique=True) |
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 logging | |
from asciimatics.screen import Screen | |
from asciimatics.scene import Scene | |
from asciimatics.widgets import Text, Frame, Layout | |
logger = logging.getLogger("my_test") | |
class TextDigit(Text): |
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
from asciimatics.screen import Screen | |
from asciimatics.scene import Scene | |
from asciimatics.widgets import Layout, Frame, Button, Text | |
class TestView(Frame): | |
def __init__(self, screen): | |
super().__init__(screen, | |
screen.height * 2 // 3, | |
screen.width * 2 // 3, | |
reduce_cpu=True, |
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
from asciimatics.screen import Screen | |
from asciimatics.scene import Scene | |
from asciimatics.widgets import Layout, Frame, Button, Text | |
class TestView(Frame): | |
def __init__(self, screen): | |
super().__init__(screen, | |
screen.height * 2 // 3, | |
screen.width * 2 // 3, | |
reduce_cpu=True, |
NewerOlder