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 node:16-alpine | |
| ARG NEXT_PUBLIC_API_URL | |
| WORKDIR /usr/src/app | |
| COPY . /usr/src/app | |
| RUN yarn add sharp | |
| RUN yarn install | |
| RUN yarn build |
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 | |
| user_id=`php /etc/openvpn/server/script/auth.php $username $password` | |
| ## Check user | |
| [ "$user_id" != '' ] && echo "user : $username" && echo 'authentication ok.' && exit 0 || echo "authentication failed. $username"; exit 1 |
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 | |
| /** | |
| * Define Login URL | |
| */ | |
| $api_url = 'https://your-website/api/v1/login'; | |
| /** | |
| * Header Add your own Header for Logging | |
| */ |
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/sh | |
| AWS_ACCESS_KEY_ID= | |
| AWS_SECRET_ACCESS_KEY= | |
| S3_BUCKET= | |
| SITE_NAME=kadekjayak.web.id | |
| WEB_ROOT=/var/www/html | |
| # Database Config | |
| MYSQL_USER=kadekjayak | |
| MYSQL_HOST=127.0.0.1 |
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
| wp core download | |
| wp core config --dbhost=localhost --dbname=homestead --dbuser=homestead --dbpass=secret | |
| wp core install --url=awesomesite.com --title="Awesome Site" --admin_name=admin --admin_password=admin --admin_email=admin@admin |
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
| # Amazon Certificate Manager | |
| # Import certificate from aws cli | |
| # tested on Let's encrypt certificate :) | |
| # | |
| # amazon cloudfront support maximum 2048 bit cert, | |
| # if more than that it wont displayed on list... | |
| # | |
| # Region must be set to us-east-1 (Virginia) if you want to use it on CloudFront | |
| aws configure set aws_access_key_id <ACCESS_KEY> |
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
| "repositories": [ | |
| // From Private GITLAB REPO | |
| { | |
| "type": "git", | |
| "url": "https://gitlab.com/kadekjayak/repository.git", | |
| "options": { | |
| "http": { | |
| "header": [ | |
| "API-TOKEN: adfasdfasdfsdf" |
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 | |
| /** | |
| * Rounding number down into nearest thousand or hunderd | |
| * a simple Round can achieve on some cases | |
| */ | |
| function ika_round($number) | |
| { | |
| $digitLength = ( strlen( $number ) - 1 ); | |
| $factor = str_pad('1', $digitLength, '0'); | |
| $result = $number / (int)$factor; |