Skip to content

Instantly share code, notes, and snippets.

View figassis's full-sized avatar

Assis Ngolo figassis

View GitHub Profile
@figassis
figassis / my.cnf
Created January 23, 2019 08:59
Default mysql config
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
sql-mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
@figassis
figassis / setup.sh
Last active July 2, 2023 16:33
Install docker on ubuntu
#!/bin/bash
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get -y install docker-ce ufw git
sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo adduser --disabled-password --gecos "" ubuntu
@figassis
figassis / compose.sh
Last active June 8, 2019 14:04
Media Center
#!/bin/bash
export USER_ID=$UID
docker-compose down; docker-compose up -d --force-recreate
@figassis
figassis / mon-a.log
Last active June 11, 2019 09:43
Rook Ceph Logs
$ kubectl logs -f rook-ceph-mon-a-74cc6db5c8-8s5l5
debug 2019-06-11 08:55:18.934 7fafa9547180 0 ceph version 14.2.1 (d555a9489eb35f84f2e1ef49b77e19da9d113972) nautilus (stable), process ceph-mon, pid 1
debug 2019-06-11 08:55:18.934 7fafa9547180 0 pidfile_write: ignore empty --pid-file
debug 2019-06-11 08:55:18.974 7fafa9547180 0 load: jerasure load: lrc load: isa
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option compression = kNoCompression
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option level_compaction_dynamic_level_bytes = true
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option write_buffer_size = 33554432
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option compression = kNoCompression
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option level_compaction_dynamic_level_bytes = true
debug 2019-06-11 08:55:18.974 7fafa9547180 0 set rocksdb option write_buffer_size = 33554432
@figassis
figassis / gencerts.sh
Created June 16, 2019 07:42
mysql ssl certs
DIR=`pwd`/openssl
PRIV=$DIR/private
mkdir $DIR $PRIV $DIR/newcerts
cp /usr/share/ssl/openssl.cnf $DIR
replace ./demoCA $DIR -- $DIR/openssl.cnf
# Create necessary files: $database, $serial and $new_certs_dir
# directory (optional)
@figassis
figassis / lista-de-nacionalidade.txt
Created July 31, 2019 08:23 — forked from lpirola/lista-de-nacionalidade.txt
Lista de países em português com suas respectivas nacionalidades
Antígua e Barbuda - Antiguano
Argentina - Argentino
Bahamas - Bahamense
Barbados - Barbadiano, barbadense
Belize - Belizenho
Bolívia - Boliviano
Brasil - Brasileiro
Chile - Chileno
Colômbia - Colombiano
Costa Rica - Costarriquenho
@figassis
figassis / README.md
Last active April 6, 2024 15:53
Deploy AWS Storage Gateway on VirtualBox

Update Ubuntu

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove

Install Required Linux Headers

sudo apt-get -y install gcc make linux-headers-$(uname -r) dkms ufw apt-transport-https ca-certificates curl software-properties-common

Add VirtualBox Repository and key

@figassis
figassis / countries.en.txt
Created January 11, 2020 11:59
some lists
Afghanistan
Akrotiri
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
@figassis
figassis / slice-batch-in-parallel.go
Created February 3, 2020 17:01 — forked from VojtechVitek/slice-batch-in-parallel.go
Golang - Loop over slice in batches (run something in parallel on a sub-slice)
package main
import "fmt"
func main() {
slice := make([]int, 159)
// Split the slice into batches of 20 items.
batch := 20
@figassis
figassis / goinstall.sh
Last active May 13, 2020 17:40 — forked from jpillora/install-go.sh
Install latest version of Go in Linux
#!/bin/bash
mkdir -p $HOME/go
curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer
. ~/.bash_profile
echo "Go is installed and your GOPATH is '$HOME/go'"
echo "Please reload this shell or enter the command '. ~/.bash_profile'"