Skip to content

Instantly share code, notes, and snippets.

View kpicaza's full-sized avatar
💭
Every day coding ;-D

Koldo Picaza kpicaza

💭
Every day coding ;-D
View GitHub Profile
@kpicaza
kpicaza / PermissionToggleConfig.php
Created September 26, 2021 11:41
Permission toggle example Laravel
<?php
// config/pheature_flags.php
declare(strict_types=1);
use ...;
return [
...,
'driver' => 'inmemory',
...,
@kpicaza
kpicaza / ExperimentToggleConfig.php
Last active September 26, 2021 11:34
Experiment toggle example Laravel
<?php
// config/pheature_flags.php
declare(strict_types=1);
use ...;
return [
...,
'driver' => 'inmemory',
...,
@kpicaza
kpicaza / OpsToggleConfig.php
Last active September 26, 2021 11:34
Ops toggle example Laravel
<?php
// config/pheature_flags.php
declare(strict_types=1);
use ...;
return [
...,
'driver' => 'inmemory',
...,
@kpicaza
kpicaza / ReleaseToggleConfig.php
Last active September 26, 2021 10:22
Release toggle example Laravel
<?php
// config/pheature_flags.php
declare(strict_types=1);
use ...;
return [
'driver' => 'inmemory',
...,
'toggles' => [
@kpicaza
kpicaza / config
Last active January 23, 2021 13:10 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = NAME
email = EMAIL
username = USERNAME
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[web]
browser = google-chrome
docker exec -i [CONTAINER_NAME] [IMAGE_NAME] -uuser -ppassword [DB_NAME] < [SQL_FILE.sql]
<?php
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
if (!$em->isOpen()) {
$em = $em->create(
$em->getConnection(),
$em->getConfiguration()
);
}
for x in OldName*
do mv "$x" "NewName${x#OldName}"
done
@kpicaza
kpicaza / gist:615bcb16099fc2d9d0a3db6d59da2f74
Created October 15, 2016 20:13 — forked from plasticbrain/gist:3887245
PHP: mime types (array format)
<?php
$mime_types = array(
'.3dm' => 'x-world/x-3dmf',
'.3dmf' => 'x-world/x-3dmf',
'.a' => 'application/octet-stream',
'.aab' => 'application/x-authorware-bin',
'.aam' => 'application/x-authorware-map',
'.aas' => 'application/x-authorware-seg',
'.abc' => 'text/vnd.abc',
'.acgi' => 'text/html',
ffmpeg -i input.flv output.mpeg