Skip to content

Instantly share code, notes, and snippets.

View rajakhoury's full-sized avatar

Raja Khoury rajakhoury

View GitHub Profile
@jeffochoa
jeffochoa / Response.php
Last active May 22, 2024 04:06
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@elenakondrateva
elenakondrateva / OneOffSyncUploads.php
Last active March 8, 2020 20:12
Synchronise OctoberCMS media files with AWS S3 cloud
<?php
namespace Acme\Console;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Storage;
class OneOffSyncUploads extends Command
@ternavsky
ternavsky / SerializableModel.php
Last active March 8, 2020 20:12
OctoberCMS Model behavior that allows to store some model's attributes in json format in grouping fields in db.
<?php namespace Path\To\Behaviors;
use System\Classes\ModelBehavior;
/**
* Model behavior that allows to store some model's attributes
* in json format in grouping fields in db.
*
* USAGE: In your model add
*
@janogarcia
janogarcia / email_coding_guidelines.md
Last active July 13, 2024 08:44
Email Coding Guidelines