Skip to content

Instantly share code, notes, and snippets.

View FusRoDah061's full-sized avatar

Allex Rodrigues FusRoDah061

  • Nelogica
  • Campinas - SP
View GitHub Profile
@letanure
letanure / estados-cidades.json
Last active June 18, 2024 01:48
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@rponte
rponte / MyAppCtxInitializer.java
Created October 31, 2012 21:17
Configuring an ApplicationContextInitializer on Spring 3.1
public class MyAppCtxInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
private static Logger LOG = LoggerFactory.getLogger(MyAppCtxInitializer.class);
@Override
public void initialize(ConfigurableApplicationContext applicationContext) {
ConfigurableEnvironment environment = applicationContext.getEnvironment();
try {
environment.getPropertySources().addFirst(new ResourcePropertySource("classpath:env.properties"));
LOG.info("env.properties loaded");
@quagliato
quagliato / select_estados.html
Last active June 6, 2024 23:50
<select> com todos os estados brasileiros
<select id="estado" name="estado">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
@jatubio
jatubio / installcomposer.bat
Last active November 16, 2022 03:43
Install composer as portable on Windows and increases Timeout
@ECHO OFF
REM Installs Composer as portable and setup home folder as composer global config folder and local folder as internal cache
REM v.2.0 - 01/05/2015
REM jatubio@gmail.com
REM Set Home folder as Composer Global Configuration Folder
SET COMPOSER_HOME=%~dp0Home
if not exist %COMPOSER_HOME% md "%COMPOSER_HOME%"
php -r "readfile('https://getcomposer.org/installer');" | php
@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
@lopspower
lopspower / README.md
Last active June 19, 2024 01:39
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

@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"
# 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
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active January 15, 2024 20:44
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;
@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()