Skip to content

Instantly share code, notes, and snippets.

View fabianoflorentino's full-sized avatar
♾️
Studing

Fabiano Santos Florentino fabianoflorentino

♾️
Studing
View GitHub Profile
@orcunuso
orcunuso / occlusterup.sh
Last active February 24, 2021 13:19
Minimal OpenShift cluster
#!/bin/bash
# Before start, please check that sysctl net.ipv4.ip_forward is set to 1.
# Install yum packages
yum install -y vim curl net-tools bash-completion yum-utils lsof
# Install Docker latest. yum-utils package is required (which provides the yum-config-manager
# utility) in order to set up the docker stable repository. After install, we need to define
# docker network as insecure registry to prevent failure during cluster creation.
@nicks9188
nicks9188 / LC_CTYPE.md
Created May 6, 2019 13:51
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
  1. vi /etc/environment

add these lines...

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Alternatively,

@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active April 25, 2024 12:45
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@gdamjan
gdamjan / ssl-check.py
Last active April 14, 2024 07:16
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket
@nshtg
nshtg / mysql-docker.sh
Last active April 2, 2024 07:24 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
@noelboss
noelboss / git-deployment.md
Last active April 25, 2024 10:38
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@adityasatrio
adityasatrio / MySqlBackup.bat
Created July 1, 2015 04:02
Mysql Backup Script For Windows
@echo off
set dbUser=root
set dbPassword=password
set backupDir="F:\AdityaSatrioNugroho\testbackupDb-bat\"
set mysqldump="C:\xampp\mysql\bin\mysqldump.exe"
set mysqlDataDir="C:\xampp\mysql\data"
set zip="C:\Program Files\7-Zip\7z.exe"
:: get date