Skip to content

Instantly share code, notes, and snippets.

View llipe's full-sized avatar
🎯
Focusing

Felipe Mallea llipe

🎯
Focusing
View GitHub Profile
@llipe
llipe / node-remove-script-osx
Created May 27, 2018 04:48
Remove node + npm from OSX Sierra
# Based on https://gist.github.com/TonyMtz/d75101d9bdf764c890ef
# Had to make it the manual way because the automated way didn't work
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
# go to /usr/local/include and delete any node and node_modules directory
@llipe
llipe / ubuntu-website-structure.sh
Created May 27, 2018 05:04
Estrucutura para crear usuarios, permisos y directorios para configurar apache y sitios web
# Estrucutura para crear usuarios, permisos y directorios para configurar apache y sitios web en Ubuntu
sudo usermod -a -G www-data ubuntu
cd $HOME
mkdir public_html
sudo chgrp www-data public_html/
# Reemplazar dominio
sudo chmod 2750 /home/ubuntu/public_html/
mkdir -p public_html/llipe.com/{public,log}
@llipe
llipe / apache-dominio.cl.conf
Last active May 27, 2018 05:08
Archivo de configuración apache tipo
<VirtualHost *:80>
ServerName dominio.cl
ServerAlias www.dominio.cl
DocumentRoot /home/ubuntu/public_html/dominio.cl/public
<Directory /home/ubuntu/public_html/dominio.cl/public/>
AllowOverride all
Require all granted
@llipe
llipe / fix-permisos-wordpress.sh
Created May 27, 2018 05:14
Corregir permisos de archivos y directorios en wordpress
# Ref: https://codex.wordpress.org/Changing_File_Permissions
# Fix de permisos de carpetas desde carpeta public del sitio
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
chmod -R 660 wp-config.php
# Minikube start
minikube start --vm-driver=hyperkit
# specify context
kubectl config use-context minikube
# get cluster info to verify kubectl is configured
kubectl cluster-info
minikube dashboard
@llipe
llipe / wordpress-backup.sh
Last active September 28, 2021 22:12
Wordpress backup script that stores a snapshot of files & database on S3
#!/bin/bash
# This script requires wp-cli to work and aws cli.
# WP CLI: https://wp-cli.org/
# AWS cli: https://aws.amazon.com/es/cli/
# Usage: wordpress-backup.sh <domain-name> <s3 bucket> <wp basepath>
if [ -z "$1" ]
then
echo "Domain name missing"
echo "Usage: wordpress-backup.sh <domain-name> <s3 bucket> <wp basepath>"
@llipe
llipe / macos-command-line-utilities.md
Last active July 20, 2020 16:57
MacOS command line utilities