Skip to content

Instantly share code, notes, and snippets.

View leohmoraes's full-sized avatar
🏠
Working/Learning and Hackathon from home

Léo Moraes leohmoraes

🏠
Working/Learning and Hackathon from home
View GitHub Profile
@leohmoraes
leohmoraes / bitbucket_dark.css
Created December 1, 2022 18:29 — forked from peterk87/bitbucket_dark.css
CSS: bitbucket.org dark theme
/*bitbucket.org dark css theme*/
body, aside {
background: #222 !important;
background-color: #222 !important;
color: #bbb !important;
}
h1, h2, h3, h4, h5, span {
background-color: transparent !important;
color: #FFC963 !important;
@leohmoraes
leohmoraes / readme Desafio.md
Last active February 16, 2022 16:05
Desafio Lojacorr

Problema

Existem X casas à venda. Juntas essas casas valem I reais. Você tem um orçamento de B reais para gastar.

Qual o maior número de casas que você pode comprar com o orçamento?

OBS: Quantidade de casas e valor podem ser definidos da maneira que desejar, é possivel também efetuar pesquisas durante o desenvolvimento

Output

# Source: https://gist.github.com/d2f36b05bf959e5fc91497ea3f0dceb3
##########################################################
# Should We Replace Docker Desktop With Rancher Desktop? #
# https://youtu.be/bYVfCp9dRTE #
##########################################################
# Referenced videos:
# - Free Docker Desktop Alternative For Mac And Windows: https://youtu.be/LGNEG-t96eE
# - K3d - How to run Kubernetes cluster locally using Rancher k3s: https://youtu.be/mCesuGk-Fks
@schakko
schakko / nginx.conf
Last active January 17, 2024 08:06
Adjusted nginx.conf to make Laravel 9 and Laravel 10 apps with PHP 8.0, 8.1 and 8.2 features runnable on Azure App Service
server {
# adjusted nginx.conf to make Laravel 9 and Laravel 10 apps with PHP 8.0, 8.1 and 8.2 features runnable on Azure App Service
# @see https://laravel.com/docs/10.x/deployment
# @see https://laravel.com/docs/9.x/deployment
listen 8080;
listen [::]:8080;
root /home/site/wwwroot/public;
index index.php;
server_name example.com www.example.com;
@DiegoVictor
DiegoVictor / index.js
Last active July 13, 2021 15:41
Palindrome Challenge
// node . [total-words] (e.g. node . 1000)
const firstAlphabetLetter = "a".charCodeAt();
const alphabetRange = "z".charCodeAt() - firstAlphabetLetter;
const [,,totalWordsArg = 10000] = process.argv;
const generateRandomWord = (min, max) => {
const randomMaxChars = Math.floor(Math.random() * max);
let word = "";
for (let i = 0; i <= min || i <= randomMaxChars; i++) {
@leohmoraes
leohmoraes / index.pug
Created November 7, 2020 02:13
Login Form - Modal
// Form
.form
.form-toggle
.form-panel.one
.form-header
h1 Account Login
.form-content
form
.form-group
label(for='username') Username
@jasonadsit
jasonadsit / download-m3u8.txt
Created July 13, 2020 14:36
download-m3u8.txt
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://example.com/stream.m3u8" -c copy "C:\path\stream.mp4"
@cferdinandi
cferdinandi / web-servers.md
Created April 29, 2020 12:36 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@LauraBeatris
LauraBeatris / Spinner.js
Created April 16, 2020 21:59
Roullete Spinner made with React Hooks
const spinWheel = useCallback(() => {
// Receives the winner prop and search for his position in the spinner bets array
const order = [8, 1, 14, 2, 13, 3, 12, 4, 0, 11, 5, 10, 6, 9, 7];
const position = order.indexOf(winner);
// Determine position where to land
const rows = 12;
const card = 80 + 2 * 2;
let landingPosition = rows * 15 * card + position * card;