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 | |
require './app/App.php'; | |
require './src/Source.php'; | |
require './Current.php'; | |
echo (new Current())->sayHello('anik'); |
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
#!/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
FROM sirajul/php74-fpm:latest | |
RUN pecl install xdebug | |
#RUN docker-php-ext-enable xdebug | |
RUN mkdir -p /home/xdebug | |
COPY ./docker/php/xdebug-debug.ini /home/xdebug/xdebug-debug.ini | |
COPY ./docker/php/xdebug-default.ini /home/xdebug/xdebug-default.ini | |
COPY ./docker/php/xdebug-off.ini /home/xdebug/xdebug-off.ini | |
COPY ./docker/php/xdebug-profile.ini /home/xdebug/xdebug-profile.ini |
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
<?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: |
NewerOlder