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 May 11, 2025 21:13
Online Resources For Web Developers (No Downloading)
@aerrity
aerrity / client.js
Last active August 30, 2024 15:49
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 April 29, 2025 16:54
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