Skip to content

Instantly share code, notes, and snippets.

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

Andrés Aquino andresaquino

🏠
Working from home
View GitHub Profile
@andresaquino
andresaquino / REGEX
Last active May 31, 2024 16:26
REGEX CURP México
5[0-9]{2}[0-9]{2}[A-Z]{1}[AEIOUX]{1}[A-Z]{2}[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[HM]{1}(AS|BC|BS|CC|CS|CH|CL|CM|DF|DG|GT|GR|HG|JC|MC|MN|MS|NT|NL|OC|PL|QT|QR|SP|SL|SR|TC|TS|TL|VZ|YN|ZS|NE)[B-DF-HJ-NP-TV-Z]{3}[0-9A-Z]{1}[0-9]{1}[0-1]{1}[0-9]{2}[0-9]{1}[1-9]{1}[0-9]{3}[0-1][1-9][0-3][0-9][0-9]{3}
@andresaquino
andresaquino / ffmpeg-cmds.sh
Last active August 29, 2021 13:06
My ffmpeg favourite commands
#!/usr/bin/env bash
# Reduce size
ffmpeg -i <video.mp4> -vcodec h264 -acodec aac <video-output.mp4>
# Extract a audio fragment from another audio
ffmpeg -ss 00:00:30 -t 00:02:58 -i <input.mp3> -acodec copy <ouput.mp3>
# Extract audio from a video
ffmpeg -i <video.avi> -f mp3 <audio.mp3>
SSL
1. 1-way SSL (a.k.a. Server Authentication)
1. Client confirms the server’s identity via the server’s provided certificate by verifying it with a CA (Certificate Authority).
2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent/received messages.
2. 2-way SSL (a.k.a. Client Authentication, Mutual Authentication)
1. Server and Client confirm the other’s identity after each share their own public certificate by verifying it with a CA.
2. Then the Public Key contained in the received certificate is used along the Session Key to encrypt all sent messages.
Keystore
@andresaquino
andresaquino / vimdiff.md
Last active May 15, 2021 11:17
vimdiff cheat sheet

vimdiff cheat sheet

git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

cmd means
@andresaquino
andresaquino / readme.md
Created May 7, 2021 07:45 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@andresaquino
andresaquino / RUNBOOK.md
Last active April 29, 2021 02:34 — forked from voxxit/RUNBOOK.md
Example of a solid run book/operations manual

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability
@andresaquino
andresaquino / programming-fonts.md
Last active April 29, 2021 02:26
Programming Fonts

Programming Fonts

Input™

Fonts for code from DJR & Font Bureau

https://input.djr.com/

Sudo

A free font for coders by Jens Kutílek

XQuartz & OS/X

  1. Install XQuartz
$> brew install xquartz
Updating Homebrew...
==> Downloading https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.1/XQuartz-2.8.1.dmg
==> Downloading from https://github-releases.githubusercontent.com/201858552/97a77400-a5f0-11eb-90ad-2973b8c2dc53?X-Amz-Algorithm=AWS4-
######################################################################## 100.0%
==> Installing Cask xquartz
@andresaquino
andresaquino / mysql_cheetsheet.md
Created December 20, 2018 16:10 — forked from weblogix/mysql_cheetsheet.md
[MySQL Cheetsheet] #mysql #mariadb

Exporting a Compressed MySQL Dump

mysqldump -u {user} -p {database} | gzip > {database}.sql.gz

Importing a Compressed MySQL Dump

gzip -dc < {database}.sql.gz | mysql -u {user} -p {database}