Skip to content

Instantly share code, notes, and snippets.

View ferminrp's full-sized avatar

Fermin Rodriguez Penelas ferminrp

View GitHub Profile
@ferminrp
ferminrp / Scriptable app widget from notion api
Created August 26, 2023 11:36
ejemplo de widget para el app scriptable usando data de notion
// Notion API URL and Headers
const notionUrl = 'https://api.notion.com/v1/databases/{tu database id aca}/query';
const notionHeaders = {
'Authorization': 'Bearer {tu secret aca}',
'Notion-Version': '2021-05-13',
'Content-Type': 'application/json'
};
// Make Notion API Request
let notionReq = new Request(notionUrl);
@ferminrp
ferminrp / Notion curl
Created August 26, 2023 11:26
Simple notion api curl
curl --location --request POST 'https://api.notion.com/v1/databases/{databaseid}/query' \
--header 'Authorization: Bearer {secret}' \
--header 'Notion-Version: 2021-05-13' \
@ferminrp
ferminrp / main.js
Created May 1, 2023 23:13
15 minute buffer in google calendar after each event
/**
* Function to create a 15-minute "Focus Time" event immediately after each calendar event
*/
function createFocusTime() {
// Access the default calendar
var calendar = CalendarApp.getDefaultCalendar();
// Get the current time
var now = new Date();
@ferminrp
ferminrp / worker.js
Last active April 17, 2023 22:07
Bitcoin Price Telegram Bot
const COINGECKO_API_URL = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd";
// Replace with your own bot token
const TELEGRAM_API_TOKEN = "{Telegram Api Token}";
const TELEGRAM_CHAT_ID = "{Your chat id}";
const TELEGRAM_SEND_MESSAGE_API = `https://api.telegram.org/bot${TELEGRAM_API_TOKEN}/sendMessage`;
async function getBitcoinPrice() {
const response = await fetch(COINGECKO_API_URL);
const data = await response.json();
@ferminrp
ferminrp / index.html
Created January 20, 2021 16:22
Styled blockquote generator
<div id="app">
<textarea onkeyup="autoheight(this)" v-model="quote" placeholder="This is the beginning of your quote. Start typing!" id="text"></textarea>
<input v-model="reference" type="text" placeholder="The author or reference of the quote">
<blockquote v-if="quote">{{quote}}</blockquote>
<p v-if="reference" class="reference">{{reference}}</p>
</div>
@ferminrp
ferminrp / filtro_newsletters.md
Created December 28, 2020 11:59
Con este filtro todos los newsletters saltean el inbox y van directo a una carpeta de newsletters

Filtro para Newsletters

En la busqueda de gmail, hace click en la fecha para abajo y en donde dice "Has the words" le pegas esto. Podes customizarlo para que matchee mejor con tus suscripciones.

(unsubscribe OR from:noreply OR from:dan@tldrnewsletter.com OR from:no-reply OR from:no_reply OR from:do_not_reply OR "[New Article]" OR "[New Post]" OR "make sure you keep getting these emails" OR "this email was sent to" OR "turn off these emails" OR "You’ve received this email because" OR "this e-mail is sent to" OR "this email is sent to" OR "received this email by mistake" -{"confirm your" mailbrew subject:urgent subject:alert label:notifications from:(noreply@lookermail.com || drive-shares-noreply@google.com)})

Dale continue y que haga: Skip Inbox, Apply label "Newsletters", apply to existing.

@ferminrp
ferminrp / index.html
Created November 22, 2020 13:13
Propinator
<div id="app">
<h1>Propinator</h1>
<p>¿De cuanto fue la cuenta?</p>
<input v-model="cuenta" type="number" placeholder="2500">
<p id="propina">Tenes que dejar ${{propina}} de propina</p>
</div>
h1, h2, h3 {font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";color: rgb(55, 53, 47)!important; font-weight: 600!important;}
h1 {font-size: 1.875em!important; line-height: 1.3!important;;}
h2 {font-size: 1.5em!important; line-height: 1.3!important;}
h3 {font-size: 1.3em!important; line-height: 1.3!important;}
.rm-title-display {font-weight: 700!important; line-height: 38px;}
@ferminrp
ferminrp / Raom research custom tags.css
Last active August 7, 2020 11:54
css for roam research's kanban boards
span.rm-page-ref-tag {
padding: 3px 7px;
line-height: 2em;
font-weight: 500;
border-radius: 2px;
font-size: 0.8em;
}
/* ACA VAN LOS EMOJIS PARA LOS TAGS QUE QUIERAS */
@ferminrp
ferminrp / index.html
Created December 2, 2018 13:50
Sample Gallery
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<meta charset="utf-8">