Skip to content

Instantly share code, notes, and snippets.

View ricardo-dlc's full-sized avatar
:shipit:
Working

Ricardo de la Cruz ricardo-dlc

:shipit:
Working
  • Cancún, México
  • 21:01 (UTC -04:00)
View GitHub Profile
@ricardo-dlc
ricardo-dlc / README.md
Last active April 19, 2024 12:21
Update Jenkins Inside a Docker Container

First identify your image.

$ docker ps --format "{{.ID}}: {{.Image}} {{.Names}}"
3d2fb2ab2ca5: jenkins-docker jenkins-docker_1

Then login into the image as root.

$ docker container exec -u 0 -it jenkins-docker_1 /bin/bash
@ricardo-dlc
ricardo-dlc / script.sh
Created November 12, 2020 13:50
Change commits author
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="mail@example.com"
CORRECT_NAME="Your Name"
CORRECT_EMAIL="mail@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
@ricardo-dlc
ricardo-dlc / vscode-settings.md
Created October 5, 2020 13:21 — forked from justinbchau/vscode-settings.md
Install italic and customizable font for vscode

Manual steps:

  • Download and install Victor Mono font
  • Update VSCode setting as bellow:
    • font size, line height and font weight are optional and you can update them as you prefer
{
    "editor.fontSize": 16,
    "editor.lineHeight": 24,
    "editor.fontWeight": "600",
    
@ricardo-dlc
ricardo-dlc / app.js
Last active August 27, 2020 15:39
Simple Nodejs approach to work with JWT's using JOSE and public/private keys generated with OpenSSL
const jose = require('jose');
const fs = require('fs');
const path = require("path");
// project
// ├── src
// │ └── app.js
// ├── package.json
// └── privatekey.pub
// └── publickey.cer
@ricardo-dlc
ricardo-dlc / .git-commit-template
Created March 12, 2020 21:48 — forked from zakkak/.git-commit-template
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@ricardo-dlc
ricardo-dlc / main.cpp
Created April 14, 2015 19:40
Arquitectura
#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <time.h>
#include <stdlib.h>
using namespace std;