Skip to content

Instantly share code, notes, and snippets.

View robilemos89's full-sized avatar

Robinson Lemos robilemos89

View GitHub Profile
@robilemos89
robilemos89 / end-focus.sh
Created April 23, 2026 16:54
Focus enabler/disabler for Linux
#!/usr/bin/env bash
# Reverse of start-focus.sh. This comments all entries of /etc/hosts that is within # Focus and # End Focus block.
set -euo pipefail
notify_user() {
local title="$1"
local body="$2"
local icon="${3:-dialog-information}"
for user in $(who | awk '{print $1}' | sort -u); do
local uid

Generating SSL keys for development

Installation

Thanks to minica it is very easy to create trusted SSL certificates that have a very long expiration date.

In order to get started you have to have the go tools installed and set up correctly in your environment.

Setup

@robilemos89
robilemos89 / 00-setup.md
Created September 6, 2020 22:51 — forked from BusterNeece/00-setup.md
My WSL2 Ubuntu 20.04 Environment

My local Ubuntu 20.04 WSL2 setup.

Enable and Install WSL2

From Windows, as admin:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
#!/bin/sh
echo "Instalação do LAMP (Linux/Apache/PHP/MySQL)"
# Repositório PHP
sudo add-apt-repository -y ppa:ondrej/php
# Repositório Apache 2
sudo add-apt-repository -y ppa:ondrej/apache2
# Repositório MariaDB
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository -y 'deb [arch=amd64,i386,ppc64el] http://mirror.ufscar.br/mariadb/repo/10.1/ubuntu xenial main'
@robilemos89
robilemos89 / wp_com_wp-cli.sh
Last active August 29, 2015 14:02
Exemplo de instalação do WordPress usando o WP-CLI
export WP_INSTALL_DIR="/var/www/html/wordpress"
wp-cli core download --path=$WP_INSTALL_DIR --locale="pt_BR" && cd $WP_INSTALL_DIR
echo "create database wordpress" | mysql -u root --password="suasenha"
wp-cli core config --dbname="wordpress" --dbuser="root" --dbpass="suasenha" --dbhost="localhost" --dbprefix="abc_"
wp-cli core install --url="http://localhost/wordpress" --title="Título do site em WordPress" --admin_user="admin" --admin_password="admin" --admin_email="email@doadmin.com"