Skip to content

Instantly share code, notes, and snippets.

View nachoaguirre's full-sized avatar

Ignacio Aguirre nachoaguirre

  • Santiago, Chile
View GitHub Profile
@nachoaguirre
nachoaguirre / fontawesome_5.15.1_categorized.json
Created April 24, 2024 06:46
JSON list of Font Awesome 5.15.1 classes
{
"Accessibility": [
"fas fa-american-sign-language-interpreting",
"fas fa-assistive-listening-systems",
"fas fa-audio-description",
"fas fa-blind",
"fas fa-braille",
"fas fa-closed-captioning",
"far fa-closed-captioning",
"fas fa-deaf",
@nachoaguirre
nachoaguirre / manageColors.ts
Created March 28, 2024 18:20
typescript helper to darken or lighten a color
export const useThemeVariables3 = () => {
interface ConfigTheme {
primaryColor: string;
textColor: string;
contrastColor: string;
bodyBackgroundColor: string;
linksColor: string;
headerBackgroundColor: string;
headerIconColor: string;
headerTextColor: string;
@nachoaguirre
nachoaguirre / custom-action-url.php
Created August 3, 2021 08:34 — forked from jayllellis/custom-action-url.php
Custom Contact Form 7 action URL
<?php
// Place this in your functions.php file
add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
function wpcf7_custom_form_action_url(){
return 'send.php';// replace this with the new action url (excluding the 'http://')
}
?>
@nachoaguirre
nachoaguirre / montar raspbian en macos.txt
Created May 21, 2021 09:30
montar partición Linux raspbian en macos
diskutil list
sudo mkdir /Volumes/rpi
sudo ext4fuse /dev/disk4s2 /Volumes/rpi -o allow_other
@nachoaguirre
nachoaguirre / wildcard.txt
Last active May 16, 2021 03:54
lego cloudflare wildcard
1. instalar lego
cd /tmp
curl -Ls https://api.github.com/repos/xenolf/lego/releases/latest | grep browser_download_url | grep linux_amd64 | cut -d '"' -f 4 | wget -i -
tar xf lego_vX.Y.Z_linux_amd64.tar.gz
sudo mkdir -p /opt/bitnami/letsencrypt
sudo mv lego /opt/bitnami/letsencrypt/lego
-------
@nachoaguirre
nachoaguirre / gist:0e23bbed49b66ae37c391b3c55b67d98
Created May 4, 2021 15:34
Create package.json from node_modules folders
1. npm init
2. ls node_modules/ | xargs npm install --save
@nachoaguirre
nachoaguirre / main.cf
Last active April 10, 2021 17:02
AWS EC2 + SES + POSTFIX SMTP Working
# CONTENIDO DEL ARCHIVO /etc/postfix/main.cf
#myorigin = /etc/mailname
biff = no
append_dot_mydomain = no
#delay_warning_time = 4h
readme_directory = no
compatibility_level = 2
# TLS parameters
@nachoaguirre
nachoaguirre / common_helpers.php
Created March 12, 2021 03:23
common_helpers.php
function fixPrecio($number, $showsign=true){
$showsign = !$showsign ? "" : "$";
return $showsign.number_format($number, 0, '.', '.');
}
@nachoaguirre
nachoaguirre / str2slug.js
Created February 7, 2021 01:48
Texto a Slug
function toSlug(str) {
str = str.replace(/^\s+|\s+$/g, '');
str = str.toLowerCase();
var from = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;";
var to = "aaaaaeeeeeiiiiooooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) { str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); }
str = str.replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-'); return str;
}
// Itera sobre objeto para agregar propiedad 'slug', basandose en propiedad 'nombre'
@nachoaguirre
nachoaguirre / bootstrap_helpers.js
Last active February 1, 2021 21:35
common helpers
/*
Añadir class según breakpoint al body
*/
var breakpoint = (function(body) {
let bp_cur = "";
var bp_dom = {
get: function (o) { var obj = Object.create(this); obj.element = (typeof o == "object") ? o : document.createElement(o); return obj; },
app: function (o) { var obj = bp_dom.get(o); this.element.prepend(obj.element); return obj; },
att: function (k, v) { this.element.setAttribute(k, v); return this; },
cls: function (c) { this.element.className = c; return this; },