This file contains 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 | |
function autoload_src($file): bool | |
{ | |
echo sprintf('autoload_src: Looking for "%s".%s', $file, PHP_EOL); | |
if (strtolower(($extract = explode('\\', $file))[0]) === 'source') { | |
return loadFileIfExists('./src', $extract[1] ?? ''); | |
} |
This file contains 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 TEMPORARY TABLE kvstore ( | |
table_name TEXT PRIMARY KEY, | |
pk_field TEXT, | |
seq_name TEXT, | |
skip BOOLEAN default false | |
); | |
INSERT into kvstore values ('password_resets', '', '', TRUE); -- skip | |
INSERT into kvstore values ('permission_role', '', '', TRUE); -- skip | |
INSERT into kvstore values ('role_user', '', '', TRUE); -- skip |
This file contains 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
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
This file contains 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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AuthServiceProvider extends ServiceProvider | |
{ | |
public function register () { | |
$this->app['auth']->provider('otp-based-auth-provider', function ($app, array $config) { |
This file contains 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\Providers; | |
use App\Models\Member; | |
use Exception; | |
use Illuminate\Contracts\Auth\Authenticatable; | |
use Illuminate\Contracts\Auth\UserProvider; | |
class MemberUserProvider implements UserProvider |
This file contains 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 | |
if [ $# != 2 ]; then | |
echo "Usage: googledown.sh ID save_name" | |
exit 0 | |
fi | |
confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p') | |
echo $confirm | |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$confirm&id=$1" -O $2 && rm -rf /tmp/cookies.txt |
This file contains 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\Providers; | |
use App\Extensions\AccessTokenGuard; | |
use App\Extensions\TokenToUserProvider; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
use Illuminate\Support\Facades\Auth; | |
class AuthServiceProvider extends ServiceProvider |
This file contains 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\Models; | |
use Illuminate\Contracts\Auth\Authenticatable; | |
use Illuminate\Database\Eloquent\Model; | |
use Tymon\JWTAuth\Contracts\JWTSubject; | |
class Member extends Model implements JWTSubject, Authenticatable | |
{ |
This file contains 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
version: "2" | |
services: | |
php: | |
build: | |
dockerfile: php.dockerfile | |
context: . | |
volumes: | |
- .:/app | |
ports: |
This file contains 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
extension=elastic_apm.so | |
elastic_apm.bootstrap_php_part_file=/home/apm-agent/apm/src/bootstrap_php_part.php | |
elastic_apm.enabled=true | |
elastic_apm.server_url="http://docker.for.mac.localhost:8200" | |
; elastic_apm.secret_token= | |
elastic_apm.service_name="PHP APM Test Service" | |
; service_version= ${git rev-parse HEAD} | |
elastic_apm.log_level=DEBUG | |
; Available Log levels | |
; OFF | CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG | TRACE |