Skip to content

Instantly share code, notes, and snippets.

View afsunday's full-sized avatar

Afuwape sunday afsunday

View GitHub Profile
@afsunday
afsunday / GitConfigHttpProxy.md
Created November 3, 2022 00:27 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL
);
CREATE TABLE conversations (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
@afsunday
afsunday / latest_conversation.sql
Created April 15, 2024 18:27 — forked from hassanrazadev/latest_conversation.sql
Get latest conversation with last message per user. (MySQL query)
SELECT
*
FROM
messages,
(
SELECT
MAX(id) as lastid
FROM
messages
WHERE
@afsunday
afsunday / ubuntu20.04_php8.1_sqlsrv.sh
Created July 17, 2024 13:32 — forked from leidison/ubuntu20.04_php8.1_sqlsrv.sh
Install PHP 8.1 and SQLSRV on Ubuntu 20.04
#!/bin/bash
#ubuntu 20.04
#php8.1
# install php ppa
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php -y
apt update