#API domains
https://desktopapps.ryanair.com
##Airports
# -*- coding: utf-8 -*- | |
# MySQL Workbench Python script | |
# | |
# <description> | |
# Written in MySQL Workbench 6.3.6 | |
# Fetch all tables, | |
# For each table, add created_at, updated_at, deleted_at timestamps, | |
# Except for many-to-many tables | |
# Configurable options: | |
# addDeletedAt: True / False. Add the deleted_at timestamp column |
# -*- coding: utf-8 -*- | |
# MySQL Workbench Python script | |
# | |
# <description> | |
# Written in MySQL Workbench 6.3.6 | |
import grt | |
# get a reference to the schema in the model. This will get the 1st schema in it. |
<?php | |
/** | |
* Class NearestValue | |
* Finds the 'nearest value' of a needle in a SORTED numeric array (ascending) | |
* Via https://stackoverflow.com/a/22375510/237739 | |
* | |
* Usage: | |
* $array = [1000,2000,3000,4000,5000]; | |
* $needle = 1337; |
# -*- coding: utf-8 -*- | |
# MySQL Workbench Python script | |
# | |
# <description> | |
# Written in MySQL Workbench 6.3.6 | |
# Fetch all tables, | |
# For each table, add created_at, updated_at, deleted_at timestamps, | |
# Except for many-to-many tables | |
# Configurable options: | |
# addDeletedAt: True / False. Add the deleted_at timestamp column |
function returnDefault(defaultReturn) { | |
return typeof defaultReturn === 'undefined' ? null : defaultReturn; | |
} | |
/** | |
* Usage: | |
* const obj = { id: 123, name: "John Doe", info: { married: false, partner: { id: 456, name: 'Mary Brown' } } } | |
* const defaultValue = '/'; | |
* const dotProp = 'info.partner.name' | |
* |
# | |
# Usage: | |
# - have all svg's in a particular folder | |
# - cd into that folder | |
# - call the script with the desired size as a parameter | |
# python svg-to-png.py 500 | |
# | |
# | |
import glob | |
import os |
function isNumber(input) { | |
return !isNaN(+input); | |
} |
<?php | |
namespace App\Traits; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Collection; | |
trait GenericTransformerTrait | |
{ | |
/** |
phpcs --config-set default_standard PSR12 |