Skip to content

Instantly share code, notes, and snippets.

View AndersonMarquess's full-sized avatar
🤹‍♂️
Estudando e praticando

Anderson Marques AndersonMarquess

🤹‍♂️
Estudando e praticando
View GitHub Profile
@AndersonMarquess
AndersonMarquess / deploy-aspnetcore-heroku.sh
Last active January 20, 2020 14:15
Enviar projeto asp.net core para o heroku
# Novo projeot
# Crie a imagem do projeto com a extensão do docker para vscode.
# Dentro da pasta principal do projeto:
$ heroku login # (Faz login no heroku CLI)
$ heroku container:login # (Login no registrador de container)
$ heroku git:remote -a aspnetcore-webapi # (aspnetcore-webapi é o nome do projeto que eu criei no heroku)
$ heroku container:push web -a aspnetcore-webapi # (faz a build do projeto e envia para o heroku)
$ heroku container:release web -a aspnetcore-webapi # (libera as alteração públicamente)
# Enviar alterações para um projeto já existente
@AndersonMarquess
AndersonMarquess / docker.sh
Last active January 20, 2020 14:16
Docker basic comands
# Criar imagem
# Listar imagens
docker image list
## Resultado:
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest fce289e99eb9 12 months ago 1.84kB
# Remover imagem
docker rmi IMAGE ID
@AndersonMarquess
AndersonMarquess / change-dock-size.sh
Created November 13, 2019 17:29
Change ubuntu dock size
echo "Barra default ativada?"
isDefault=$(gsettings get org.gnome.shell.extensions.dash-to-dock extend-height)
# Alterna entre a dock de tamanho padrão e a dock de tamanho reduzido
if [ "$isDefault" = "true" ]; then
echo "Customizando tamanho da barra"
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false
else
echo "Restaurando tamanho padrão da barra"
gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true
@AndersonMarquess
AndersonMarquess / ping-my-app.gs
Last active July 5, 2023 17:01
Google Apps Script for ping url based on Spreadsheet content
function wakeup() {
var rowIndex = 2;
const urlColumn = 3;
var urlCell = getCell(rowIndex, urlColumn);
while(!urlCell.isBlank() && isPingEnabled()) {
ping(urlCell.getValue());
printLogFor(urlCell, rowIndex);
{
"author": "akamud",
"name": "OneDark",
"colors": {
"activityBar.background": "#333842",
"activityBar.foreground": "#D7DAE0",
"activityBarBadge.background": "#528BFF",
"activityBarBadge.foreground": "#D7DAE0",
"button.background": "#4D78CC",
"button.foreground": "#FFFFFF",
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));"
@AndersonMarquess
AndersonMarquess / SecurityConfig.java
Created October 2, 2019 01:39
Disable spring security
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
// allow access to all endpoints
http.csrf().disable().authorizeRequests().antMatchers("/**").permitAll();
}
}