Skip to content

Instantly share code, notes, and snippets.

View FusRoDah061's full-sized avatar

Allex Rodrigues FusRoDah061

  • Nelogica
  • Campinas - SP
View GitHub Profile
@Roger-Melo
Roger-Melo / reduce-scores-case-boilerplate.js
Last active April 8, 2024 23:15
Boilerplate para um caso de uso do reduce()
const phaseScores = [
{ name: 'Vinicius Costa', score: 337 },
{ name: 'Roger Melo', score: 43 },
{ name: 'Alfredo Braga', score: 234 },
{ name: 'Pedro H. Silva', score: 261 },
{ name: 'Ana Paula Rocha', score: 491 },
{ name: 'Vinicius Costa', score: 167 },
{ name: 'Roger Melo', score: 137 },
{ name: 'Alfredo Braga', score: 135 },
{ name: 'Ana Paula Rocha', score: 359 },
@Roger-Melo
Roger-Melo / filter-case-boilerplate.js
Created May 4, 2020 14:03
Boilerplate para um caso de uso do filter()
const users = [
{ name: 'Ada Lovelace', premium: true },
{ name: 'Grace Hopper', premium: false },
{ name: 'Alan Turing', premium: true },
{ name: 'Linus Torvalds', premium: false },
{ name: 'Margaret Hamilton', premium: true }
]
@Roger-Melo
Roger-Melo / map-case-boilerplate.js
Created May 3, 2020 20:58
Boilerplate para um caso de uso do map()
const products = [
{ name: 'Mouse Sem Fio', price: 30 },
{ name: 'Pen Drive', price: 25 },
{ name: 'Cartucho de Tinta', price: 50 },
{ name: 'Suporte Ergonômico para Notebook', price: 23 },
{ name: 'Repetidor de Sinal Wi-Fi', price: 44 }
]
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
@PierfrancescoSoffritti
PierfrancescoSoffritti / eventBus.js
Last active February 15, 2024 14:16
A simple implementation of an event bus in Javascript. More details here: https://medium.com/@soffritti.pierfrancesco/create-a-simple-event-bus-in-javascript-8aa0370b3969
/**
* subscriptions data format:
* { eventType: { id: callback } }
*/
const subscriptions = { }
const getNextUniqueId = getIdGenerator()
function subscribe(eventType, callback) {
const id = getNextUniqueId()
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active September 23, 2024 19:29
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
# this is a simple bash script to load up a hard coded spotify url and play it
# make sure to make the file excutable (chmod 777 autostart_music.sh)
# to add it on boot, look here: https://www.raspberrypi.org/documentation/linux/usage/rc-local.md
# Made by LUNZCORP
mpc clear # this clears any loaded music
mpc random on
@jonashackt
jonashackt / bash
Last active December 1, 2021 01:45
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
@lopspower
lopspower / README.md
Last active November 14, 2024 08:32
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@BonsaiDen
BonsaiDen / record.sh
Last active September 3, 2023 10:12
Record from Virtual Frame Buffer via ffmpeg
xvfb-run -s "-screen 0 1280x800x16" -e /dev/stdout -a /home/ivo/Desktop/foo.sh
./ffmpeg -r 30 -f x11grab -draw_mouse 0 -s 1280x800 -i :99 -c:v libvpx -quality realtime -cpu-used 0 -b:v 384k -qmin 10 -qmax 42 -maxrate 384k -bufsize 1000k -an screen.webm
# foo.sh
google-chrome --incognito --window-size=1280,800 --app=http://github.com