Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am leonelf on github.
  • I am leonelf (https://keybase.io/leonelf) on keybase.
  • I have a public key ASBxDHO4hebYXPWD4WIJ6brzNf_To4I-5t37eilw3sthdQo

To claim this, I am signing this object:

alias gordo {
var %glorioso = Viva-o
;Made thinking of fALSOVSKY
;THIS SCRIPT MAY NEVER FAIL
if ($ctime($date $time) < $ctime($date 10:00)) {
if ($calc($ctime($date 10:00) - $ctime($date $time)) < 600) { /msg $1 4/!\ ACHTUNG! 4/!\ Já se pode comer! }
/msg $1 Faltam $duration($calc($ctime($date 10:00) - $ctime($date $time))) para o lanxe Matinal! }
elseif ($ctime($date $time) < $ctime($date 12:20)) { /msg $1 Faltam $duration($calc($ctime($date 12:20) - $ctime($date $time))) para o taxo! }
elseif ($ctime($date $time) < $ctime($date 16:00)) {
if ($calc($ctime($date 16:00) - $ctime($date $time)) < 600) { /msg $1 4/!\ ACHTUNG! 4/!\ Já se pode comer! }

Keybase proof

I hereby claim:

  • I am leonelf on github.
  • I am leonelf (https://keybase.io/leonelf) on keybase.
  • I have a public key ASDNmwwt9VXvp7Fb9iqbORb3zC43bpgodW1IpDZkAMR9Ggo

To claim this, I am signing this object:

@LeonelF
LeonelF / app.js
Created August 9, 2019 13:36
Coinbase-Pro Get open orders and Filled transactions
const CoinbasePro = require('coinbase-pro');
const key = 'App_key';
const secret = 'App_secret';
const passphrase = 'PassPhrase';
const apiURI = 'https://api.pro.coinbase.com';
const sandboxURI = 'https://api-public.sandbox.pro.coinbase.com';
const authedClient = new CoinbasePro.AuthenticatedClient(
@LeonelF
LeonelF / plugin.py
Last active March 30, 2020 09:27
Covid-19 Live Data Script - commands: fcovid19 <country> / fcovid19y <country> / cv19pt / fcv19pt <concelho>
###
# Copyright (c) 2020, Leonel Faria
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
@LeonelF
LeonelF / titleGrabber.py
Created June 2, 2021 11:07
Grabs the title from a webpage
import urllib.parse
import requests
response = urllib.request.urlopen('https://www.youtube.com/watch?v=-IYfwCWZeD0')
for line_number, line in enumerate(response):
#print('line: '.format(line))
if "<title>" in str(line):
tmp = str(line)
tmp = tmp.split("<title>",1)[1]
tmp = tmp.split("</title>",1)[0]
<?php
function telegram($chat_id,$message) {
$botToken = "BOT TOKEN HERE";
$url="https://api.telegram.org/bot". $botToken ."/sendMessage";
$params= array('chat_id' => $chat_id, 'parse_mode' => 'HTML', 'text' => $message);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);