Skip to content

Instantly share code, notes, and snippets.

View FernandoCelmer's full-sized avatar

Fernando Celmer FernandoCelmer

View GitHub Profile
#!/bin/bash
read -p 'Email: ' email
ssh-keygen -t ed25519 -C $email
eval "$(ssh-agent -s)"
read -p 'SSH File Name: ' configfile
read -p 'Host Name: ' confighost
read -p 'Host Domain: ' configdomain
{
"Debug Console Python": {
"prefix": "frompdb",
"body": [
"from pdb import set_trace; set_trace()"
],
"description": "Debug PDB Python"
}
}
FROM archlinux:base-devel
RUN useradd -m build && \
pacman -Syu --noconfirm && \
pacman -Sy --noconfirm git && \
echo "build ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/build
USER build
WORKDIR /home/build
import os
pattern = [
"⚙️ FEATURE",
"📝 PEP8",
"📌 ISSUE",
"🪲 BUG",
"📘 DOCS",
"📦 PyPI",
"❤️️ TEST",
import scrapy
class BlogSpider(scrapy.Spider):
name = 'blogspider'
start_urls = ['https://www.zyte.com/blog/']
def parse(self, response):
for title in response.css('.oxy-post-title'):
yield {'title': title.css('::text').get()}
def pyramid(scale: int):
node = []
for index in range(1, scale + 1):
node.append((index*2-scale)*"*") if (index*2-scale) > 0 else None
for item in node:
print(item.center(scale))
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Todo App</title>
<link rel="icon" type="image/png" href="favicon.png" />
"""
selenium==4.6.0
webdriver-manager==3.8.4
packaging==21.3
"""
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
settings_module = __import__("settings.development", globals(), fromlist=[None], level=0)
for settings in dir(settings_module):
if not (settings.startswith('_') or settings.endswith('_')):
globals()[settings] = getattr(settings_module, settings)