Skip to content

Instantly share code, notes, and snippets.

@palozano
palozano / index.html
Created June 28, 2023 15:07
Auto refresh browser for (local) dev
<head>
<meta http-equiv="refresh" content="3">
</head>
@palozano
palozano / htmlcssmerge.py
Created March 13, 2023 13:37
Inline CSS/JS/static inside HTML
from html.parser import HTMLParser
import os
import sys
import base64
gHelp = """
Merge JS/CSS/images/HTML into one single file
Version: 1.0

Keybase proof

I hereby claim:

  • I am palozano on github.
  • I am palozano (https://keybase.io/palozano) on keybase.
  • I have a public key ASDHmB1HKOPVNXcceiJQR2hzGm7KKITFO1npIgWr2iMnRgo

To claim this, I am signing this object:

@palozano
palozano / commit-msg
Last active December 13, 2022 12:12
Git hook validator for convetional commits
#!/usr/bin/env python
import re, sys, os
sys.tracebacklimit = 0
FAIL_MESSAGE = """
Conventional Commit validation failed.
A commit message must be as follows:
# Useful commands
Here you can find things I find useful and may reuse yourself.
Not good stuff imo, but hey
## Find alias in ZSH, when you are using .oh-my-zsh and some plugins:
zsh -ixc : 2>&1 | grep <alias-to-find>
@palozano
palozano / .vimrc
Last active March 27, 2021 21:35
Minimal but functional Vim configuration without plugins
set nocompatible
syntax enable
filetype plugin on
set path+=**
set wildmenu
set encoding=utf-8
set listchars=trail:.,tab:>\ ,eol:$
set lazyredraw
set laststatus=2
@palozano
palozano / rsync_usage.md
Last active June 13, 2023 15:50
Rsync usage

Notes on using rsync

First, install it, using apt, yum, pacman, etc.

Local usage

Imagine we want to back up files from Directory1 to Directory2, and both are on the same hard drive (this would work the same if the directories are on two different drives). There are several different ways to do this, depending on what kind of backups (i.e., options you want to give rsync) you want to configure. The most general, will be this:

$ rsync -av --delete /Directory1/ /Directory2/