Skip to content

Instantly share code, notes, and snippets.

View glauber-md's full-sized avatar

Glauber M. Dantas glauber-md

View GitHub Profile
@skhatri
skhatri / Dockerfile
Created June 24, 2020 12:38
alpine docker zulu java11 microservices
FROM azul/zulu-openjdk-alpine:11.0.7
LABEL base=alpine engine=jvm version=java11 timezone=UTC port=8080 dir=/opt/app user=app
RUN apk update && apk add --no-cache tzdata curl bash && rm -rf /var/cache/apk/*
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
EXPOSE 8080
RUN mkdir -p /opt/app && ln -s /opt/app /lib
@h3nr1ke
h3nr1ke / UsefulGitCommands.txt
Last active April 3, 2018 15:06
Useful git tips
#--- good resource
http://gitready.com/
#--- When you want to commit files that used to be ignored or vice versa
git rm -r --cached .
git add .
git commit -m "Commit follows the .gitignore again"
#--- Get the remote URL from a repository
git config --get remote.origin.url
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active July 5, 2024 08:18
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

<?php
/**
* Arquivo de exemplo para descriptografar os dados do visa checkout apos validacao do usuario
* este codigo esta na documentacao disponivel em
* https://developer.visa.com/capabilities/visa_checkout/docs
*
*/
/**
* Exeuta o primeiro nivel de descriptografia
@h3nr1ke
h3nr1ke / rename.bat
Last active February 5, 2018 21:51
Rename all files to a numeric sequence
:: initial count
SET i=0
setlocal EnableDelayedExpansion
:: filter for extension, jpg as example
for %%f in (*.jpg) do (
:: rename the current file to the new name
ren "%%~nf%%~xf" "!i!.jpg"
:: increase the counter
@briansmith
briansmith / how-to-generate-and-use-private-keys-with-openssl-tool.md
Last active April 11, 2024 17:02
How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@nrollr
nrollr / Commands.sh
Last active January 10, 2023 11:55
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
## when installing on Amazon Linux AMI, use:
$ sudo yum install nginx -y
## when installing on Amazon Linux 2 AMI, use
$ sudo amazon-linux-extras install nginx1.12 -y
## Install PHP and PHP-FPM
# for PHP version 7.1 use php71 and php71-fpm instead
$ sudo yum install php -y
$ sudo yum install php-fpm -y
@justinpawela
justinpawela / config
Created August 3, 2016 01:39
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@kelvinn
kelvinn / cmd.sh
Created July 24, 2014 02:55
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/