Skip to content

Instantly share code, notes, and snippets.

View mrtngrsbch's full-sized avatar

Martin Gersbach mrtngrsbch

View GitHub Profile
/* General */
div.notion-topbar > div > div:nth-child(1n).toggle-mode {
display: none !important;
}
div.notion-topbar-mobile > div:nth-child(1n).toggle-mode {
display: none !important;
}
div.notion-topbar-mobile > div:nth-child(5) {
display: none !important;
}
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
@mrtngrsbch
mrtngrsbch / deepl_for_google_sheets.txt
Created May 8, 2022 19:33 — forked from enogylop/deepl_for_google_sheets.txt
Deepl script for google sheets
function deepl(value1, value2, value3) {
var url = `https://api-free.deepl.com/v2/translate?auth_key=xxxx-xxxx-xxxx-xxxx-xxxx&text=${value1}&target_lang=${value3}&source_lang=${value2}`;
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var data = JSON.parse(json);
return data.translations && data.translations.length > 0 ? data.translations[0].text : "No value";
// replace auth_key with a "Deepl for developer" API key
// source : this script is a modified version of
// http://5.9.10.113/67485395/google-sheets-custom-function-to-translate-with-deepl-api-not-working-as-expecte
}
@mrtngrsbch
mrtngrsbch / chatgpt_api.py
Created March 25, 2023 08:06 — forked from mouredev/chatgpt_api.py
Ejemplo de uso del API de ChatGPT desde Python
import openai # pip install openai
import typer # pip install "typer[all]"
from rich import print # pip install rich
from rich.table import Table
"""
Webs de interés:
- Módulo OpenAI: https://github.com/openai/openai-python
- Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat
- Typer: https://typer.tiangolo.com