Skip to content

Instantly share code, notes, and snippets.

View i-amolo's full-sized avatar

Innocent J. Blacius i-amolo

View GitHub Profile
@i-amolo
i-amolo / httpd-vhosts.conf
Created March 10, 2022 17:56 — forked from daveh/httpd-vhosts.conf
How to set up a virtual host in Apache (WAMP, MAMP, XAMPP) (code to accompany https://youtu.be/kRfo5OPUC2M)
<VirtualHost *:80>
DocumentRoot "/www/project1"
ServerName site1.localhost
<Directory "/www/project1">
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
@sjimenez44
sjimenez44 / TimeZone.md
Created September 8, 2021 19:19
Change time zone Docker container

Change TimeZone in Docker containers

With Docker Engine

The timezone of a container can be set using an environment variable in the docker container when it is created. For example:

$ docker run ubuntu:latest date
Sat Feb 27 15:58:32 UTC 2021
$ docker run -e TZ=America/Bogota ubuntu:latest date
Sat Feb 27 15:58:40 Asia 2021
@Bill-tran
Bill-tran / how-to-install-openssl-1.1.1-on-centos-7.md
Created September 7, 2021 09:22
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
input {
kafka{
codec => json
bootstrap_servers => "localhost:9092"
topics => ["elastic-test"]
}
}
filter {
mutate {
@laurentbel
laurentbel / !Nginx Basic Auth.md
Last active September 21, 2024 12:05
Nginx reverse proxy with basic authentication

Nginx Basic Auth

A simple demo of using Nginx as a reverse proxy to add basic authentication.

@rossnelson
rossnelson / docker-compose.yaml
Created January 26, 2021 14:24
golang and ms sqlserver using sqlx and go-mssqldb
version: '3'
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Melon40twomonkeys
ports:
- '1433:1433'
<?php
// check_and_notify.php
function notifySlack(string $message): void
{
$curl = curl_init();
curl_setopt_array(
$curl,
[
CURLOPT_URL => getSlackUrl(),
@kangmasjuqi
kangmasjuqi / mysql_root_password_changes_on_centos7.txt
Created June 10, 2020 13:39
Change/Reset MySQL Root password on Centos 7
https://stackoverflow.com/questions/33510184/change-mysql-root-password-on-centos7/34207996#34207996
1. Stop mysql:
systemctl stop mysqld
2. Set the mySQL environment option
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
3. Start mysql usig the options you just set
systemctl start mysqld
@philippegirard
philippegirard / logging.conf
Last active March 9, 2023 08:27
FastAPI logging
[loggers]
keys=root,uicheckapp
[handlers]
keys=consoleHandler,detailedConsoleHandler
[formatters]
keys=normalFormatter,detailedFormatter
[logger_root]
@Naskalin
Naskalin / #1_PostController.php
Last active June 21, 2024 07:19
Simple Doctrine Paginator and example usage for Symfony. Простейшая постраничная навигация в Symfony.
<?php
namespace App\Controller;
use App\Utils\Paginator;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;