Skip to content

Instantly share code, notes, and snippets.

View alexandremucci's full-sized avatar

Alexandre Mucci alexandremucci

View GitHub Profile
@alexandremucci
alexandremucci / spring-boot-actuator-settings.properties
Created March 17, 2022 02:59
Basic set of properties to be used when adding Spring Boot Actuator to a Spring Boot Project
#####################################################################################################################
# Spring Boot Actuator settings
# port used to expose actuator
management.server.port=8081
# CIDR allowed to hit actuator
management.server.address=127.0.0.1
# block access to all endpoints over JMX
@alexandremucci
alexandremucci / ExampleBot.java
Created July 7, 2020 02:59
Example of Telegram Bot class implementation
package com.alexandremucci.telegrambot.bots;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.telegram.telegrambots.bots.TelegramLongPollingBot;
import org.telegram.telegrambots.meta.api.objects.Update;
@Component
public class ExampleBot extends TelegramLongPollingBot {
@alexandremucci
alexandremucci / create-bitbucket-repo.sh
Last active February 16, 2018 22:31
Script to create and clone Bitbucket repository (using Bitbucket REST API)
#!/bin/bash
# set username
username="username"
# set password to use REST API
# If you have two-step verification enabled (which is recommended), set an app password with restricted permissions (admin for repositories) an use it here.
# To other restricted actions below (clone and push) you will be asked to provide your password or ssh key.
# You can also change these lines (clone and push) and use the same password defined here, but be aware of security concerns about storing passwords in plain text.
password="password"