Skip to content

Instantly share code, notes, and snippets.

View mauriballes's full-sized avatar
😄
Doing Amazing Stuffs!

Mauricio Ballesteros mauriballes

😄
Doing Amazing Stuffs!
View GitHub Profile
@mauriballes
mauriballes / install-moodle.sh
Created March 24, 2024 03:06
Installation script for moodle usign Ubuntu 22.04
#!/bin/bash
apt-get update
apt-get install nginx mariadb-server -y
apt install software-properties-common ca-certificates lsb-release apt-transport-https -y
add-apt-repository ppa:ondrej/php -y
apt install php7.4 php7.4-fpm php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-soap php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip unzip git curl -y
sed -i 's,^memory_limit =.*$,memory_limit = 256M,' /etc/php/7.4/fpm/php.ini
sed -i 's,^;max_input_vars =.*$,max_input_vars = 6000,' /etc/php/7.4/fpm/php.ini
sed -i 's,^;cgi.fix_pathinfo=.*$,cgi.fix_pathinfo = 0,' /etc/php/7.4/fpm/php.ini
sed -i 's,^upload_max_filesize =.*$,upload_max_filesize = 100M,' /etc/php/7.4/fpm/php.ini

Kill pods on Terminating state

WARNING!!!
COPY FROM STACKOVERFLOW

Thanks to:

@mauriballes
mauriballes / Scaling-on-fedora.md
Last active September 26, 2022 15:53
Scaling on Fedora
gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
@mauriballes
mauriballes / merge-kubeconfigs-files.md
Created July 1, 2022 20:21
Merge multiples Kubeconfigs files

Merge kubeconfig files

KUBECONFIG="/path/cluster1.config:/path/cluster2.config" kubectl config view --flatten > ~/.kube/config
@mauriballes
mauriballes / fix_rancher_ns.md
Created May 17, 2022 00:36
Fix Rancher terminating namespace problem

Fix Rancher terminating namespace problem

Requirements

  • jq
  • kubectl

Config your terminal for access rancher cluster

  • Download kubeconfig file
@mauriballes
mauriballes / kill_ports.sh
Created March 15, 2022 00:25
Kill Process using a Port
# Show process
lsof -i:8080
# Kill process listed
kill -9 $(lsof -t -i:8080)
@mauriballes
mauriballes / values.yaml
Created October 22, 2020 02:23
Helm Value for Wordpress in Kubernetes with External DB
## Blog/Site Info
wordpressUsername: user
wordpressPassword: password
wordpressEmail: [email protected]
wordpressFirstName: Mauricio
wordpressLastName: Ballesteros
wordpressBlogName: mauriballes' Blog!
service:
type: ClusterIP
@mauriballes
mauriballes / postgres-backup.md
Created August 23, 2020 20:46
Postgres Backup

Postgres Backup Commands

Backup

pg_dump -U postgres -W -O -x -c -h localhost postgres > script.sql

Restore

psql -U postgres -W -h localhost postgres < script.sql
version: '3'
services:
db:
image: mariadb:latest
volumes:
- data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=wordpress