Skip to content

Instantly share code, notes, and snippets.

View frekele's full-sized avatar
:octocat:
☕️ 🍩 📚

Leandro Kersting de Freitas frekele

:octocat:
☕️ 🍩 📚
  • Brazil
View GitHub Profile
import java.math.BigDecimal;
import java.time.Duration;
import java.time.Instant;
import java.util.Scanner;
public class IterativeFibonacci {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a number:");
import java.math.BigDecimal;
import java.time.Duration;
import java.time.Instant;
import java.util.Scanner;
public class IterativeFactor {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a factorial:");
@frekele
frekele / ecr-cred-updater.sh
Created July 29, 2018 10:19 — forked from cablespaghetti/ecr-cred-updater.sh
Automatic Updating Amazon ECR Credentials in Kubernetes
#!/bin/bash
# Get directory of script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ $# -ne 1 ]]
then
echo "ERROR: This script expects the namespace name to be given as an argument"
echo "e.g. ./ecr-cred-updater.sh my-namespace"
exit 1
@frekele
frekele / bin-cc.md
Created January 26, 2018 17:12 — forked from erikhenrique/bin-cc.md
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
@frekele
frekele / Jenkinsfile.groovy
Created July 19, 2016 03:12 — forked from rlespinasse/Jenkinsfile.groovy
Jenkinsfile to tag the sources used by current build
node {
repositoryAccess = 'https://'
repositoryAccessSeparator = '/'
echo "repository host: ${repositoryHost}" // github.com
echo "repository path: ${repositoryPath}" // <user>/<repository>.git
echo "repository jenkins credentials id: ${credentialsId}" // jenkins credentials for the jenkins git account who have commit access
echo "repository branch: ${branch}" // master or another branch
echo "repository commiter username: ${repositoryCommiterUsername}" // Jenkins account email
echo "repository commiter name: ${repositoryCommiterEmail}" // Jenkins
#!/bin/bash
### REF: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
### http://docs.aws.amazon.com/cli/latest/reference/ec2/attach-volume.html
### http://docs.aws.amazon.com/cli/latest/reference/ec2/detach-volume.html
set -e
#Id do volume, adicionar manualmente aqui.
VOLUME_ID=$PERSISTENT_VOLUME_ID

The process starts by creating the CSR and the private key:

openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"

Generates

  • dotmarks.net.key
  • dotmarks.net.csr