Skip to content

Instantly share code, notes, and snippets.

View osantana's full-sized avatar
🏠
Working from home

Osvaldo Santana Neto osantana

🏠
Working from home
View GitHub Profile
import xchat
__module_name__ = "* epx L"
__module_version__ = "0.1.0"
__module_description__ = "Ensina como usar /clear"
def clear_cb(word, word_eol, userdata):
ctx = xchat.get_context()
ctx.command("me acha que limpar a tela eh para os fracos!")
@osantana
osantana / timer.py
Last active December 28, 2022 13:11
A simple timer implementation that supports clock injection
import time
from datetime import datetime
class Clock:
def now(self):
return datetime.now()
class Timer:
# or a simpler alternative...
@osantana
osantana / rss_sample.xml
Last active December 28, 2023 18:34
RSS Sample
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:georss="http://www.georss.org/georss"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
@osantana
osantana / output.log
Last active May 31, 2022 13:28
Poetry Bug report
$ GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 poetry update -vvv
Using virtualenv: [redacted]/poetry/bugreport/.venv
Updating dependencies
Resolving dependencies...
1: fact: bugreport is 0.1.0
1: derived: bugreport
0: Duplicate dependencies for grpcio
0: Different requirements found for grpcio (^1.46.0) with markers platform_machine != "arm64" and grpcio (1.46.1) with markers platform_machine == "arm64".
1: Version solving took 12.312 seconds.
1: Tried 1 solutions.
{
"meta": {
"page": {
"offset": 0,
"limit": 25,
"count": 1,
"total": 1
},
"filter": {
"identifiers": {
>>> d1 = d2 = {
'name': 'Osvaldo',
'address': {
'street': 'Rua Goiania',
'number': '1597',
'complement': 'sob 34'
}
}
>>> patch = {
@osantana
osantana / hilightWords.js
Created March 14, 2022 16:51
Google Docs Highlight Words
function highlightWords() {
wordList = ["obséquio", "amplexos", "mormente", "vós"];
content = DocumentApp.getActiveDocument().getBody();
wordList.forEach((word) => {
let range = content.findText("(?i)" + word);
let element = range.getElement();
element.asText().setBackgroundColor("#ff0000");
})
}
| neumann | johnathafelix/main | ~/Work/experiments/node-chromedriver
$ npm install
> chromedriver@93.0.1 install
> node install.js
Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
Downloading from file: https://chromedriver.storage.googleapis.com/93.0.4577.15/chromedriver_mac64_m1.zip
Saving to file: /var/folders/68/xm9lt4hn05g87sh09p2ycb500000gn/T/93.0.4577.15/chromedriver/chromedriver_mac64_m1.zip
Received 1040K...
| neumann johnathafelix/main ~/Work/experiments/node-chromedriver
$ npm install
> chromedriver@93.0.1 install
> node install.js
Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
Downloading from file: https://chromedriver.storage.googleapis.com/93.0.4577.15/chromedriver_mac64_m1.zip
Saving to file: /var/folders/68/xm9lt4hn05g87sh09p2ycb500000gn/T/93.0.4577.15/chromedriver/chromedriver_mac64_m1.zip
Received 1040K...
@osantana
osantana / wordleat.py
Created January 21, 2022 12:46
List wordle.at words
#!/usr/bin/env python
import re
rawwords = {
"whitelist": "gbvampnkwxxbgxgxbgxkxbgxfwnkvaatuxgwbxlxdxbgxptkxgatmmxbffxklvahgngmxkzxzxgebxzmlmxamcxmsmlxbxgwbxlxdhffmxbgxlwtuxbwtfbmlxbgxcxmsmgxnxglmtmmctakxaxnmxlmtwmpxkwxxklmxxmptlsnwxfexuxgbagxgobxexwtuxbftvamzxuxgubmmxaxnmxpxzxglibxelbxamobxexlxaxglxbmxlxbgxbakxguxbwxzxaxgxbgxglhztketgzxwnkvalmbxzsxbzmwtmxglmtgwyktzxkheexmaxftteexlzkngwwtfbmikxblbakxgztgsxltzmxzxzxgteexguebxubakxkgbffmlmtkutuxgwyhezxietmsmbmxetikbewknvdlmtkdabeyxphvaxyxaemlxmsmlheexfnlbdubmmxzxkgxlxvalsnwxftdmbxdtfxggxnxkuebvdgtfxgteexfwkhamdxbgxftkdmcxwxkfxbgxptknfwtohgyhezmpxgbzhiyxkltvaxyhmhlkxzxenglxkzxgtncxwxggxnxltnzxgwtaxkbffxkebxuxfbmmxingdmlvahgngmxkcxwxkfxbgxkxvamlmttmtemxgexuxgfxblmteexlexnmxfxmxkmtzxguxlmxznmxgabeymbakxfhyyxgltzxgytakmeblmxmbxkxngbhgwtaxkbagxgpbkdmdkblxftvamgtmnkkxblxlbvamlhglmuxbwxdgtiigxuxgkxbaxlnvaxxgwxmahaxgnglxktemxkdkbxzgtvamlmtgwpxzxgznmxkcngzxexzmxlhkzmuxknyuhwxgwbgzxyxnxkdktymebvamlihkmztuxgabgsnmkbmmutlblbwxxgdtfiygbvamkngwxwbxgmdxggmexlxglbmsmlmx