This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
#-------------------------------------------------------------------------- | |
# Install | |
#-------------------------------------------------------------------------- | |
# | |
RUN apk --no-cache add \ | |
libmcrypt-dev \ | |
freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev \ | |
wget \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create our app directory | |
RUN mkdir -p /var/www | |
# Set it as our working dir | |
WORKDIR /var/www | |
# add our composer dependancies | |
ADD composer.json ./ | |
# install our dependancies without running scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM andrewmclagan/aphex:latest | |
# | |
#-------------------------------------------------------------------------- | |
# Configure | |
#-------------------------------------------------------------------------- | |
# | |
ADD ./nginx.conf /etc/nginx/nginx.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd /var/www | |
php artisan optimize --force | |
php artisan config:cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function from12to24(hours, minutes, meridian) { | |
let h = parseInt(hours, 10); | |
const m = parseInt(minutes, 10); | |
if (meridian.toUpperCase() === 'PM') { | |
h = (h !== 12) ? h + 12 : h; | |
} else { | |
h = (h === 12) ? 0 : h; | |
} | |
return new Date((new Date()).setHours(h,m,0,0)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use Illuminate\Support\Collection; | |
use Illuminate\Database\Eloquent\Model; | |
use Elasticsearch\Client; | |
use App\Models; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Cinema\Cast; | |
class CerseiLannister | |
{ | |
private string $name = 'Cersei Lannister'; | |
private JoannaLannister $child; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
window.__state = [ | |
{ name: 'Jaime Lannister', age: 42, avatar: '//api.adorable.io/avatars/134/[email protected]' }, | |
{ name: 'Cersei Lannister', age: 37, avatar: '//api.adorable.io/avatars/134/[email protected]' }, | |
{ name: 'Joanna Lannister', age: 16, avatar: '//api.adorable.io/avatars/134/[email protected]' }, | |
]; | |
// Create react component(s) to display a list of Lannister family members |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import DataTable from 'components/DataTable'; | |
import CollectionViewControls from 'components/CollectionViewControls'; | |
/** | |
* Entity collection view | |
* @author Andrew McLagan <[email protected]> | |
*/ | |
export default ({ collection, children, filters, className }) => ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace EthicalJobs\Foundation\Storage; | |
use Illuminate\Support\Collection; | |
interface Repository | |
{ | |
/** | |
* Find a model by its id |