Skip to content

Instantly share code, notes, and snippets.

View britisharmy's full-sized avatar
🎯
Focusing

Geoffrey britisharmy

🎯
Focusing
  • Worldwide
View GitHub Profile
<public:attach event="ondocumentready" onevent="CSSHover()" />
<script>
/**
* Whatever:hover - V3.11
* ------------------------------------------------------------
* Author - Peter Nederlof, http://www.xs4all.nl/~peterned
* License - http://creativecommons.org/licenses/LGPL/2.1
*
* Special thanks to Sergiu Dumitriu, http://purl.org/net/sergiu,
* for fixing the expression loop.
@britisharmy
britisharmy / Procfile
Created December 3, 2018 06:59 — forked from ellefsen/Procfile
Heroku with Google Cloud SQL and cloud_sql_proxy with PHP / Laravel
web: (bash ./start.sh) & vendor/bin/heroku-php-nginx public/
@britisharmy
britisharmy / asyncio_producer_consumer.py
Created April 23, 2019 11:33 — forked from akrylysov/asyncio_producer_consumer.py
Python 3 asyncio basic producer / consumer example
import asyncio
import random
q = asyncio.Queue()
async def producer(num):
while True:
await q.put(num + random.random())
await asyncio.sleep(random.random())
@britisharmy
britisharmy / letsencrypt_2019.md
Created April 17, 2020 20:28 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@britisharmy
britisharmy / UploadResume.vue
Created March 14, 2021 10:35 — forked from connor11528/UploadResume.vue
Vue.js component for uploading a file to Amazon S3
<template>
<div class="row text-center">
<div class="col-md-12 mb-3">
<label>Upload your resume</label>
<small>(.pdf or .docx file please)</small>
</div>
<div class="col-4 offset-4 text-center mb-3">
<!-- Upload resume button. Trigger function on browser file upload -->
<input type="file" name="resume" @change="uploadResume" class="form-control-file">
</div>
@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
@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 / 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'>
Step 1
Install using composer this package
composer require kopokopo/k2-connect-php
Step 2
Get production credentials from your KopoKopo account. Feed the requisite parameters and you are ready to go.
@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>