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 | |
/** | |
* @param string $jsonFilename | |
* @param string $csvFilename | |
* @return bool|int | |
*/ | |
function json2csv($jsonFilename, $csvFilename) | |
{ | |
$json = file_get_contents($jsonFilename); |
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 json | |
import re | |
filepath = 'sample.html' | |
file = open(filepath, 'r') | |
body = file.read() | |
matches = re.findall(r'<script>window.jsonModel = (.+?)</script>', body) | |
blob = json.loads(matches[0]) | |
print(json.dumps(blob, indent=4, sort_keys=True)) |
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 DateInterval; | |
use DatePeriod; | |
use DateTime; | |
use Exception; | |
use Illuminate\Support\Facades\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
# Set composer folder for this command and update | |
commands: | |
01-updateComposer: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
option_settings: | |
"aws:elasticbeanstalk:container:php:phpini": | |
document_root: /public | |
composer_options: --no-dev --no-interaction --prefer-dist --optimize-autoloader | |
"aws:elasticbeanstalk:sqsd": |
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 | |
/* | |
Description: The point-in-polygon algorithm allows you to check if a point is | |
inside a polygon or outside of it. | |
Author: Michaël Niessen (2009) | |
Website: http://AssemblySys.com | |
If you find this script useful, you can show your | |
appreciation by getting Michaël a cup of coffee ;) | |
PayPal: [email protected] |
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 php:7.3-apache | |
MAINTAINER James Wade <[email protected]> | |
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions | |
# see example at https://hub.docker.com/_/php/ | |
RUN apt-get update && apt-get install -y \ | |
libbz2-dev \ | |
libfreetype6-dev \ | |
libgd-dev \ | |
libjpeg62-turbo-dev \ |
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
#!/usr/bin/env bash | |
vagrant box add ie11-win81 http://aka.ms/ie11.win81.vagrant | |
vagrant init ie11-win81 | |
vagrant up |
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
brew install selenium-server-standalone | |
brew cask install chromedriver | |
selenium-server -p 4444 |
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 php:5.6-apache | |
MAINTAINER James Wade <[email protected]> | |
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions | |
# see example at https://hub.docker.com/_/php/ | |
RUN apt-get update && apt-get install -y \ | |
libbz2-dev \ | |
libfreetype6-dev \ | |
libgd-dev \ | |
libjpeg62-turbo-dev \ |
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
#!/usr/bin/env bash | |
# @see https://github.com/zalando/zalenium/tree/master/docs/k8s/helm | |
# @todo helm install local/zalenium - @see https://github.com/kubernetes/helm/issues/3873 | |
# @see https://zalando.github.io/zalenium/#kubernetes | |
set -e | |
docker pull elgalu/selenium | |
docker pull dosel/zalenium | |
[[ -d zalenium ]] || git clone [email protected]:zalando/zalenium.git | |
cd zalenium | |
kubectl create -f kubernetes/ || kubectl apply -f kubernetes/ |