Skip to content

Instantly share code, notes, and snippets.

View alexaugustobr's full-sized avatar
🤔
0x141A140E6

Alex Alves alexaugustobr

🤔
0x141A140E6
View GitHub Profile
  • Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
  • Installation date: 16-08-2019
  • Additional notes based on my own experience
  • EFI boot
  • Ubuntu 19.04 -> 21.04
  • This should work on any computer. Only the RAID > AHCI change described below and the device name for the nvme ssd drive are specific to this laptop.
  • The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
  • The process was conducted on Dell's XPS 15 9560 (2017) with specs:
  • CPU: i7-7700HQ
@alexaugustobr
alexaugustobr / CorsConfig.java
Created August 23, 2022 17:41 — forked from thiagofa/CorsConfig.java
Configuração de CORS no Authorization Server com CorsFilter
// Fonte: https://spring.io/blog/2015/06/08/cors-support-in-spring-framework#filter-based-cors-support
import java.util.Collections;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
@alexaugustobr
alexaugustobr / gist:7e971be23948116883debb93e7ca88bd
Created June 10, 2022 20:50 — forked from MerNat/gist:8ee69c5eeaa4ac909b0044f48e9569b0
Traefik docker compose yml for cluster or swarm configuration.
version: '3.4'
services:
consul-leader:
image: consul
command: agent -server -client=0.0.0.0 -bootstrap -ui
volumes:
- consul-data-leader:/consul/data
environment:
- CONSUL_BIND_INTERFACE=eth0
@alexaugustobr
alexaugustobr / Client.java
Created May 10, 2022 22:25 — forked from sjohnr/Client.java
JpaRegisteredClientRepository
/*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alexaugustobr
alexaugustobr / Authorization.java
Created May 10, 2022 22:25
JpaOAuth2AuthorizationService for Spring Authorization Server
/*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alexaugustobr
alexaugustobr / AuthorizationConsent.java
Created May 10, 2022 22:25 — forked from sjohnr/AuthorizationConsent.java
JpaOAuth2AuthorizationConsentService
/*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alexaugustobr
alexaugustobr / react-moderno.md
Created October 25, 2021 20:12 — forked from danielbonifacio/react-moderno.md
React moderno: O que você precisa saber para começar com React em 2020

React moderno: O que você precisa saber para começar com React em 2020

Não é de hoje que o React.js é o queridinho das empresas de desenvolvimento de software quando se fala em mobile e front-end web, e isso fez com que surgissem inúmeras vagas relacionadas à tecnologia.

Mas nem todo profissional ou iniciante da área de desenvolvimento tem domínio da linguagem de programação JavaScript (que é a base do React.js), e acabam com medo de iniciar com a tecnologia.

Se você é um deles, seus problemas acabaram agora. Neste artigo vamos abordar tudo que você precisa saber sobre React, sem a necessidade de muito conhecimento em JavaScript.

Índice

@alexaugustobr
alexaugustobr / Dockerfile
Created December 16, 2020 12:00 — forked from Wildcarde/Dockerfile
Jedi Knight: Jedi Academy Dockerized Server
## Docker file to build a jedi academy server and mount the apk files from a source folder
FROM centos
MAINTAINER Garrett McGrath <gmcgrath815 at gmail.com>
RUN yum install -y wget unzip
RUN wget https://www.dropbox.com/s/mbdmpim04krl1o2/jalinuxded_1.011.zip?dl=0 -O /tmp/temp.zip; unzip /tmp/temp.zip -d /opt/jaserv; \
wget https://www.dropbox.com/s/ig82qlsohlbwzye/dedicated_ja_server_unofficialpatch.zip?dl=0 -O /tmp/patch.zip; unzip /tmp/patch.zip -d /tmp/patch; \
cp /tmp/patch/DEDICATED_JA_server_UnofficialPATCH/linuxjampded /opt/jaserv/linuxjampded; \
rm /tmp/temp.zip /tmp/patch.zip; rm -fr /tmp/patch; \
@alexaugustobr
alexaugustobr / simple-pagination.js
Created October 26, 2019 22:57 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@alexaugustobr
alexaugustobr / github.css
Created October 28, 2018 00:05 — forked from tuzz/github.css
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: