Skip to content

Instantly share code, notes, and snippets.

View ea2809's full-sized avatar
🚐
Working from home or RV

Enrique García Galán ea2809

🚐
Working from home or RV
View GitHub Profile
@tbutts
tbutts / tmux-migrate-options.py
Last active May 7, 2025 15:12
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@phelian
phelian / movmeta
Last active November 14, 2024 17:10
Golang: Read creation time from mov/mp4
package main
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
"os"
"time"
@troyfontaine
troyfontaine / 1-setup.md
Last active May 15, 2025 22:58
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@Maes95
Maes95 / exportAsPDF.js
Last active March 15, 2017 11:17
Simple export HTML element to PDF
function exportToPDF(title, id, css){
setTimeout(function () {
var printWindow = window.open("", "", "width=1000, height=800");
printWindow.document.write('<html><head><title>'
+title
+'</title>'
+css
+'</head><body onload="window.print()">'
+ document.getElementById(id).innerHTML
+ '</body></html>');
@ruizfrontend
ruizfrontend / provincias.html
Last active April 7, 2017 10:32
Selector de provincias
<select name="provincias" id="provincias">
<option value="">----</option>
<option value="ES_C">A Coruña</option>
<option value="ES_AB">Albacete</option>
<option value="ES_A">Alicant</option>
<option value="ES_AL">Almería</option>
<option value="ES_VI">Araba</option>
<option value="ES_O">Asturias</option>
<option value="ES_AV">Ávila</option>
<option value="ES_BA">Badajoz</option>