Skip to content

Instantly share code, notes, and snippets.

View FelixLuciano's full-sized avatar
🔭
Discovering

Luciano Felix FelixLuciano

🔭
Discovering
View GitHub Profile
@FelixLuciano
FelixLuciano / black.md
Last active January 7, 2024 14:41
⚫ BLACK

Just an black screen that goes fullscreen when you click anywhere.

data:text/html,%3Chtml%3E%3Chead%3E%3Ctitle%3EBLACK%3C%2Ftitle%3E%3Clink%20rel%3D%22icon%22%20href%3D%22data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48dGV4dCB4PSItMC4xZW0iIHk9Ii45MGVtIiBmb250LXNpemU9Ijg2Ij7imqs8L3RleHQ%2BPC9zdmc%2B%22%3E%3Cscript%3Ewindow.addEventListener%28%27click%27%2C%20%28%29%20%3D%3E%20%7Bdocument.body.requestFullscreen%28%29%7D%29%3C%2Fscript%3E%3C%2Fhead%3E%3Cbody%20style%3D%22background-color%3A%20black%3B%22%3E%3C%2Fbody%3E%3C%2Fhtml%3E
@FelixLuciano
FelixLuciano / PlaybackRate.html
Last active March 31, 2022 23:02
⏩ PlaybackRate Bookmarklet
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3>Bookmarklets</H3>
<DL><p>
<DT><A HREF="javascript:(function(s){document.querySelectorAll('video,audio').forEach(a=>a.playbackRate=s===null?1:s);console.log(s)})(prompt(%22Speed%22,%20%221%22))" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACK0lEQVQ4jZWTvU9UURDFf+e+t28/WIhBjMFGCUQtTCyMiTEYoSM2FpZQiZZaWBoL/gVrbRRt1BYag/oXGEks6Awa3AQiq8uyK2/33rF47/ERbTzVvbkz5545MyMK3Fsuc/3aBGma3fsShxGbQQIJ8GvjK/PndwCyoMXmRcrxC0IYw/fBIcyOEkhGwIgiI0q22OvcZW5kJQYgsgfU6xdo/gi4yElgAqzIzY8O8D4wUB2j9/sRkBPACN00IAUsyLxlWQ4IYMEgUqHX6HYC5odZsNjlBCaZo2eaPBHz9MqAas5EJ+j2eKLHl2uiF0QAZdZkeaOoICgebCBC8+MVlqaHcA5OVRz3z1V5crWOCyYLViiBBlYQyLJ6FczwZkydLPF8epDBkvBm3Jmo8GyyTkVIWObMKIoPFBSeCYfoB2P2dJLVZ9DtB+bOlPnWCTz85HESYb+WPIhcnWHETqzvBt42ehhQjR3ru5436ylEwnLJ7rAC8lY7iUY3cPP9DkvfeziJ1WafmXctPm72UCzy/H2Cgs/iyNmXtufGhxarGynHSmKt5ZlZabHW9LhylH0uMx
@FelixLuciano
FelixLuciano / aproximador.py
Last active December 10, 2021 20:03
Aproxima valores da variável de uma equação dada condições de existência e uma igualdade dentro
import numpy as np
from scipy.optimize import root
class Aproximador:
def __init__(self, f, sigma=1E-3):
"""Aproxima valores da variável de uma equação dada condições de existência e uma igualdade dentro.
Args:
f (function): Função matemática para encontrar variáveis;
sigma (float): Margem de tolerância para operações decimais.
def valid_input (validator=str, prompt="", accept=None, reject=[], persist=True, apply=None):
while True:
try:
response = validator(input(prompt))
normalized = apply(response) if apply != None else response
except ValueError:
if persist != False:
print("Invalid input!")
else:
return None
@FelixLuciano
FelixLuciano / superUgly.js
Last active April 5, 2021 14:42
rendezvous with cassidoo #190 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/to-understand-is-to-invent-jean-piaget/
* @param {number} n Integer
* @param {number[]} primes Sorted array of prime integers
* @returns {number} Return the nth positive number whose all prime factors are in the array primes.
* @example
* $ superUgly(1, [2, 3, 5])
* -> 1
*
* $ superUgly(11, [2, 7, 13, 19])
@FelixLuciano
FelixLuciano / validNumber.js
Created March 29, 2021 12:06
rendezvous with cassidoo #189 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/success-is-more-a-function-of-consistent-common/
* @param {string} str String
* @returns {boolean} If the given string represents a valid number.
* @example
* $ validNumber("-123.456")
* -> true
*
* $ validNumber("abc123")
* -> false
@FelixLuciano
FelixLuciano / maxNum.js
Created March 25, 2021 07:27
rendezvous with cassidoo #188 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/i-never-dreamed-about-success-i-worked-for-it/
* @param {number[]} m Integer Array.
* @param {number[]} n Integer Array.
* @param {number} k Integer.
* @returns {number} Using the digits from `n` and `m`, return the largest number of length `k`.
* @example
* n = [3,4,6,5]
* m = [9,0,2,5,8,3]
* k = 5
@FelixLuciano
FelixLuciano / pascals.js
Created March 15, 2021 13:52
rendezvous with cassidoo #187 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/5c50e780-c247-4167-a99d-99f4b9656011
* @param {number} rowIndex Row index
* @returns {number[]} Values in that row of Pascal’s Triangle.
* @example
* $ pascals(3)
* -> [1, 3, 3, 1]
*/
function pascals (rowIndex) {
let row = [1]
@FelixLuciano
FelixLuciano / validTTTPosition.js
Last active March 9, 2021 20:24
rendezvous with cassidoo #186 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/37ac19b1-2bea-4354-8860-3fdb47e456cd
* @param {string[]} board A Tic Tac Toe board
* @returns {boolean} If and only if it’s possible to reach this board position during the course of a valid tic-tac-toe game.
* @example
* const board = ["XOX", "O O", "XOX"]
*
* $ validTTTPosition(board)
* -> true
*/
@FelixLuciano
FelixLuciano / makeSentence.js
Last active February 15, 2021 18:16
rendezvous with cassidoo #183 - Interview question of the week
/**
* From: https://buttondown.email/cassidoo/archive/to-know-how-much-there-is-to-know-is-the/
* @param {string} str String
* @param {string[]} dict A list of non-empty words
* @returns {string[]} Return all possible sentences
* @example
* const str = "penpineapplepenapple"
* const dict = ["apple", "pen", "applepen", "pine", "pineapple"]
*
* $ makeSentence(str, dict)