Skip to content

Instantly share code, notes, and snippets.

View lironesamoun's full-sized avatar
🏠
Working from home

Lirone S. lironesamoun

🏠
Working from home
  • Marseille
View GitHub Profile
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active July 12, 2025 08:08
Online Resources For Web Developers (No Downloading)
@aerrity
aerrity / client.js
Last active June 1, 2025 16:35
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection
{
if (!(_capturing && _videoCaptureConsumer)) {
return;
}
CMTime time = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
CVReturn lock = CVPixelBufferLockBaseAddress(imageBuffer, 0);
@ryansechrest
ryansechrest / php-style-guide.md
Last active July 14, 2025 23:37
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts