Skip to content

Instantly share code, notes, and snippets.

View britisharmy's full-sized avatar
🎯
Focusing

Geoffrey britisharmy

🎯
Focusing
  • Worldwide
View GitHub Profile
@britisharmy
britisharmy / host-react-app-on-apache-server.md
Created March 7, 2023 19:35 — forked from ywwwtseng/host-react-app-on-apache-server.md
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@britisharmy
britisharmy / countries
Created January 5, 2023 16:01 — forked from kalinchernev/countries
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
[supervisord]
nodaemon=true
loglevel=debug
[program:amon]
command=gunicorn -c gunicorn.conf.py wsgi
directory=/amon
autostart=true
autorestart=true
redirect_stderr=true
@britisharmy
britisharmy / install_php_8_1.sh
Created November 21, 2022 12:39 — forked from DenisJunio/install_php_8_1.sh
Laravel - PHP 8.1 Extensions - Ubuntu
#!/bin/bash
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt upgrade -y
sudo apt install php8.1 -y
sudo apt install php8.1-bcmath -y
sudo apt install php8.1-bz2 -y
sudo apt install php8.1-cli -y
sudo apt install php8.1-common -y
sudo apt install php8.1-curl -y
@britisharmy
britisharmy / rejson-for-ubuntu.md
Last active May 17, 2024 10:48 — forked from lmj0011/rejson-for-ubuntu.md
Building and Loading the ReJSON v2.2.0 Module on Linux Ubuntu 20.04 for Redis
git clone https://github.com/RedisJSON/RedisJSON.git

git checkout v2.2.0

sudo apt-get install -y clang

curl https://sh.rustup.rs -sSf | sh
@britisharmy
britisharmy / php-restrictions.nginxconf
Created October 28, 2022 23:09 — forked from Ellrion/php-restrictions.nginxconf
Nginx + Php-fpm config for Laravel app
# /etc/nginx/global/php-restrictions.conf
# Don't throw any errors for missing favicons and don't display them in the logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
# Don't log missing robots or show them in the nginx logs
location = /robots.txt {
allow all;
@britisharmy
britisharmy / alpineAxios.html
Created October 27, 2022 21:49 — forked from novecentonove/alpineAxios.html
Alpine js / Axios Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<title>Alpine and axios</title>
</head>
@britisharmy
britisharmy / meta-tags.md
Created August 30, 2021 13:30 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@britisharmy
britisharmy / HTML_Select_Alpha2_CountryCodes.html
Created June 16, 2021 07:41 — forked from intltechventures/HTML_Select_Alpha2_CountryCodes.html
HTML Select statement implementation of the Alpha-2 COdes for the ISO-3166-1 Country Code specification
<!DOCTYPE HTML>
<html>
<head><title>Sample HTML Select for Alpha-2 Country Codes</title></head>
<body>
<p>
This is a sample of the generated output of a Country Code utility class that I created - as part of a larger utility library that I use for client projects.
</p>
<p>
@britisharmy
britisharmy / latency.txt
Created April 22, 2021 13:59 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD