Skip to content

Instantly share code, notes, and snippets.

View clementmas's full-sized avatar

clem clementmas

View GitHub Profile
@marcoarment
marcoarment / S3.php
Last active June 25, 2023 19:41
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
https://developers.strava.com/
https://developers.strava.com/docs/webhooks/
https://developers.strava.com/docs/webhookexample/
@ikhsanalatsary
ikhsanalatsary / setup_cmder_wsl.md
Last active January 17, 2024 16:31
Setup cmder with WSL 2

Using WSL 2

  1. Open cmder
  2. On the menu, open Settings option and then select Startup > Tasks from the menu tree (or just hit Win + Alt + T)
  3. Click the “+” button to add a new task and fill in the fields as follow:
  4. Name: {zsh::home}
  5. Task Parameters:
    /icon "%CMDER_ROOT%\icons\cmder.ico"
    
@concision
concision / GeoJSON.ts
Last active November 1, 2023 13:45
Typescript types for the GeoJSON RFC7946 specification
/**
* Typescript types for the GeoJSON RFC7946 specification. This is not fully RFC-compliant due to lack of support for
* ranged number data types.
*
* See https://tools.ietf.org/html/rfc7946
*/
export declare namespace GeoJSON {
/**
* Inside this document, the term "geometry type" refers to seven case-sensitive strings: "Point", "MultiPoint",
* "LineString", "MultiLineString", "Polygon", "MultiPolygon", and "GeometryCollection".
@BenSampo
BenSampo / deploy.sh
Last active April 20, 2024 23:54
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@SleepWalker
SleepWalker / swipe.js
Created September 30, 2015 04:59
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@astockwell
astockwell / README.md
Last active April 5, 2024 01:43
PHP Video Url Parser

Youtube/Vimeo Video Url Parser

Parses URLs from major cloud video providers. Capable of extracting keys from various video embed and link urls to manipulate and access videos in various ways.

Usage

VideoUrlParser::identify_service("https://www.youtube.com/watch?v=x_8kFbZf20I&amp;feature=youtu.be");