Skip to content

Instantly share code, notes, and snippets.

View iraklisg's full-sized avatar

iraklisg iraklisg

  • Athens, Greece
View GitHub Profile
@mistic100
mistic100 / vimeo-downloader.js
Created September 15, 2018 09:01
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
@paulredmond
paulredmond / docker.conf
Last active May 6, 2024 15:38
Example www pool for PHP-FPM with dynamic Environment variables
; if you're using the starter bundle file `docker/php/php-fpm.d/docker.conf`
[global]
daemonize = no
pid = run/php-fpm.pid
[www]
listen = /usr/local/var/run/php-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
@thecrypticace
thecrypticace / ParentChildHierarchy.php
Last active February 20, 2020 07:09
Eloquent recursive relationships
<?php
namespace App;
use Illuminate\Database\Eloquent\Collection;
class ParentChildHierarchy
{
public static function apply($entities, $primaryKey = "id", $parentKey = "parent_id", $parentRelation = "parent", $childRelation = "children")
{
@fourstacks
fourstacks / TestCase.php
Created September 9, 2020 08:25
Example TestCase using Laravel 8 model factories
<?php
namespace Tests;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Str;
abstract class TestCase extends BaseTestCase
{
✨ - New feature
👾 - Bugfix
🎨 - UI and style
🔨 - Code refactoring, dependency upgrade, improving code quality
🚧 - Work in progress
🌐 - Translations
🚀 - Performance improvement
♿ - Accessibility improvements
🔒 - Security improvement
⚙️ - Configuration