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 / shell-cmds.sh
Last active November 26, 2018 17:34
My shell favourite commands
#!/usr/bin/env bash
# $> brew info mpgtx
# mpgtx: stable 1.3.1 (bottled)
# Toolbox to manipulate MPEG files
# Up{date|grade} && cleanup
brew update && \
brew upgrade && \
brew cask upgrade && \
@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>
@andresaquino
andresaquino / POSTMORTEM.md
Created April 10, 2018 19:54 — forked from voxxit/POSTMORTEM.md
Example/outline of a postmortem to be conducted after a site outage/incident

POSTMORTEM: “Event Title Here”

Issue Summary

This should be a short (4-5 sentences) blurb which succinctly describes the event. At the very least, it should include:

  • the duration (with start & end times in the U.S. Pacific time zone):

…which lasted for roughly 10 minutes between 9:02PM and 9:12PM Pacific…

  • the impact to our users:
@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 / haproxy-db.conf
Created April 2, 2018 08:37 — forked from aw/haproxy-db.conf
HAProxy configuration for MySQL failover and redundancy
# HAProxy configuration - haproxy-db.cfg
##
## FRONTEND ##
##
# Load-balanced IPs for DB writes and reads
#
frontend db_write
bind 172.16.0.50:3306
@andresaquino
andresaquino / headers.vim
Last active May 3, 2018 13:33
VIM Plugin para establecer los headers en scripts (bash, ruby, python, perl, vim, php, js, c/c++) de forma automática.
" Vim File
" vim:si:ai:et:ts=3:sw=3:ft=vim
" (c) 2018, Andres Aquino <inbox@andresaquino.sh>
" This file is licensed under the BSD License version 3 or later.
" See the LICENSE file.
"
" Based on work of Agapo (fpmarias@google.com), /usr/share/vim/vim70/plugin/header.vim
" LastModf: 20180326.034630
@andresaquino
andresaquino / bashtimer
Last active March 15, 2018 21:55
Un sencillo timer en bash
#!/bin/sh
# vim: ts=3 sw=3 sts=3 et si ai:
# (c) 2018, Andres Aquino <inbox@andresaquino.sh>
# This file is licensed under the BSD License version 3 or later.
# See the LICENSE file.
trap "exit 0" SIGINT SIGTERM
ccount=0
while(true); do
@andresaquino
andresaquino / pkcs12-test-01
Created December 27, 2017 08:42
pkcs12-test-01
$> openssl pkcs12 -in uat-domain-br.pfx -nocerts
Enter Import Password:
MAC verified OK
Bag Attributes
localKeyID: 41 D4 48 C4 1D 3E 50 FE CA 9E 8A 2F BF 10 A5 A7 4B BE 20 88
friendlyName: uat-domain-br
Key Attributes:
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----BEGIN ENCRYPTED PRIVATE KEY-----
@andresaquino
andresaquino / theme.html
Created September 24, 2017 08:27 — forked from soemarko/theme.html
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->

Keybase proof

I hereby claim:

  • I am andresaquino on github.
  • I am andresaquino (https://keybase.io/andresaquino) on keybase.
  • I have a public key whose fingerprint is B3E9 BCB3 6102 30AA 2D85 0F78 0E31 EE04 39B6 E6AD

To claim this, I am signing this object: