Skip to content

Instantly share code, notes, and snippets.

View leolemos's full-sized avatar

Leonardo Lemos leolemos

View GitHub Profile
@autoize
autoize / optimizeNextCloud.sh
Created September 18, 2017 04:35
NextCloud Optimization Script
#!/bin/bash
# NextCloud Optimization Script
# with PHP Opcache and Redis Memcache
# Important: Do not run until the setup wizard in your browser is complete (has initialized the config.php file).
# Author: Autoize (autoize.com)
upload_max_filesize=4G # Largest filesize users may upload through the web interface
post_max_size=4G # Same as above
memory_limit=512M # Amount of memory NextCloud may consume
@autoize
autoize / backupToB2.sh
Created September 8, 2017 17:20
NextCloud Backup to BackBlaze B2
#!/bin/sh
# NextCloud to BackBlaze B2 Backup Script
# Author: Autoize (autoize.com)
# This script creates an incremental backup of your NextCloud instance at BackBlaze's off-site location.
# BackBlaze B2 is an object storage service that is much less expensive than using Amazon S3 for the same purpose, with similar versioning and lifecycle management features.
# Uploads are free, and storage costs only $0.005/GB/month compared to S3's $0.022/GB/month.
# Requirements
@jniltinho
jniltinho / install-phpmyadmin-ispconfig.sh
Last active October 20, 2023 08:03
Install phpMyAdmin on ISPConfig
#!/bin/bash
## Install phpMyAdmin on ISPConfig
## Debian 9 or Ubuntu (Apache2 and Nginx)
## phpMyAdmin 4.8.3
cd /tmp/
get_file=https://files.phpmyadmin.net/phpMyAdmin/4.8.3/phpMyAdmin-4.8.3-all-languages.tar.gz
wget ${get_file}
tar -xzvf $(basename ${get_file})
rm -f $(basename ${get_file}) && mv phpMyAdmin-*-all-languages myadmin
@vasanthk
vasanthk / System Design.md
Last active July 29, 2025 06:47
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@willurd
willurd / web-servers.md
Last active July 29, 2025 08:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@willurd
willurd / dotpath.sh
Last active May 15, 2023 06:12
Manage your PATH with a nice, one-directory-per-line file, rather than a gargantuan blob of colon-delimited text.
# Read the contents of ~/.path into $PATH, if ~/.path exists. ~/.path should be a file
# consisting of one path on each line, such as:
#
# ~$ cat ~/.path
# # vim: ft=sh
# ~/usr/bin
# /opt/local/bin
# ... etc ...
#
# Note that comments begin with a hash (#).
@shrwnsan
shrwnsan / .bash_aliases
Last active July 12, 2024 10:25
Webhost .dotfiles
# Alias: Files & Folders
alias ls="ls --color=auto"
alias la="ls -aF"
alias lc="ls -lcr"
alias ld="ls -ld"
alias lk="ls -lSr"
alias ll="ls -lF"
alias lla="ls -al"
alias lm="ls -al | more"
alias lr="ls -lR"