Skip to content

Instantly share code, notes, and snippets.

@hlombroso
hlombroso / homebrew-permissions-issue.md
Created May 16, 2022 06:14 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

Install Homebrew on Mac

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install pyenv to Manage Your Python Versions

brew install pyenv

Use pyenv to Install Python or Update Your Python Version

@hlombroso
hlombroso / mysql_secure.sh
Created March 30, 2021 12:27 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@hlombroso
hlombroso / websocat-install.sh
Created December 26, 2020 08:43 — forked from mingliangguo/websocat-install.sh
install websocat in ubuntu
# libssl-dev and pkg-config are required in order to build websocat
#
apt-get update && apt-get install -y curl build-essential libssl-dev pkg-config
curl https://sh.rustup.rs -sSf | sh
export PATH=$HOME/.cargo/bin:$PATH
cargo install --features=ssl websocat
@hlombroso
hlombroso / my.cnf
Created July 24, 2020 00:12 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@hlombroso
hlombroso / restart-ssh-gist.sh
Created July 18, 2020 09:58 — forked from JoaquimLey/restart-ssh-gist.sh
Restart ssh-agent
killall ssh-agent; eval `ssh-agent`
@hlombroso
hlombroso / supervisord-example.conf
Created May 6, 2020 07:58 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
# URL https://flask-restful.readthedocs.io/en/latest/quickstart.html#full-example
from flask import Flask
from flask_restful import reqparse, abort, Api, Resource
app = Flask(__name__)
api = Api(app)
TODOS = {
'todo1': {'task': 'build an API'},