Skip to content

Instantly share code, notes, and snippets.

View jefrnc's full-sized avatar
🏠
Working from home

joseph jefrnc

🏠
Working from home
View GitHub Profile
@jefrnc
jefrnc / script.sh
Created February 4, 2020 13:36
Jenkins - Install with Proxy Reverse
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
sudo systemctl start jenkins.service
systemctl status jenkins.service
sudo dnf install policycoreutils-devel setroubleshoot-server
sepolicy network -t http_port_t
sudo semanage port -a -t http_port_t -p tcp 8080 #(definimos rgla para el tcp/8080)
sudo dnf install nginx
@jefrnc
jefrnc / fix.sh
Created February 13, 2020 13:19
Maven sonar plugin: trust self-signed certificate
#[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project data.model: Unable to execute SonarQube: Fail to get bootstrap index from server: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
keytool -import -v -trustcacerts -alias mySonarServer -file sonarServer.crt -keystore cacerts
#Where cacerts is the one from the JRE installation.
@jefrnc
jefrnc / migrate.sh
Created February 13, 2020 13:23
Moving Git repository content to another repository preserving history
git clone --mirror <url_of_old_repo>
cd <name_of_old_repo>
git remote add new-origin <url_of_new_repo>
git push new-origin --mirror
@jefrnc
jefrnc / git_set_httppostBuffer.sh
Created May 3, 2020 15:51
Git, fatal: The remote end hung up unexpectedly
git config --global http.postBuffer 524288000
@jefrnc
jefrnc / Jenkinsfile
Created May 27, 2020 04:56
Jenkins - Recovery Users & Passwords
stage("Te saco las clave") {
steps {
script {
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class,
Jenkins.instance,
null,
null
);
for (c in creds) {
@jefrnc
jefrnc / settings.xml
Created May 27, 2020 16:15
m2 - settings
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
BCBA:GGAL*10/NASDAQ:GGAL
@jefrnc
jefrnc / gist:ef88628d3f20d146ff787e898c0438f7
Last active October 15, 2020 04:31
Git Repository Transfer Keeping All History
git clone --mirror old-repo-url new-repo
cd new-repo
git remote remove origin
git remote add origin new-repo-url
git push --all
git push --tags
@jefrnc
jefrnc / 0-README.md
Created December 11, 2020 22:41 — forked from alexcasalboni/0-README.md
AWS Lambda: Advanced Coding Session - clda.co/aws-lambda-webinar

AWS Lambda: Advanced Coding Session (slides)

Live demos:

  1. Amazon API Gateway Access Control
  2. Amazon Kinesis Streams processing
  3. Amazon Cognito Sync trigger
  4. AWS CloudFormation Custom Resources
@jefrnc
jefrnc / publish_lambda_example.sh
Last active January 7, 2021 02:37
Publicación de una slayer para una funcion Python (importando jwt)
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7
sudo apt install pipenv
pip3 install pipenv --user
pipenv --python 3.7
pipenv shell
#pip install jwt
#pip uninstall jwt==1.0.0