// Controller.php
$breadcrumb = [
[ "label" => $page_title, "path" => "/$path" ],
[ "label" => $txt_manage, "path" => null ],
];
// view.blade.php
@section('page-title')
@include('breadcrumb', ['breadcrumb' => $breadcrumb])
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
| const puppeteer = require('puppeteer'); | |
| const Chrome = async ({ STEP }) => { | |
| const browser = await puppeteer.launch({ headless: false }); | |
| const page = await browser.newPage(); | |
| await STEP(browser, page); | |
| browser.close(); | |
| } |
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
| version: '3.1' | |
| services: | |
| web: | |
| build: ./www | |
| volumes: | |
| - ./www:/var/www/app | |
| ports: | |
| - 8000:8000 | |
| links: | |
| - db |
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 ubuntu:16.04 | |
| WORKDIR /var/www/app | |
| # Update | |
| RUN apt-get update | |
| # base tool | |
| RUN apt-get install -y curl python git unzip iputils-ping |
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
| const fs = require('fs'); | |
| console.reset = function () { | |
| return process.stdout.write('\033c'); | |
| } | |
| const read_todo = () => { | |
| return new Promise((res, rej)=>{ | |
| fs.readFile('./todo.json', 'utf8', (err, data) => { | |
| if (err) throw rej(err); |
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
| <div > | |
| time: <span id="time"></span> ms, counter: <span id="counter"></span> | |
| </div> | |
| <h4>วันหยุด mahidol</h4> | |
| <ul id="todo-list" style="list-style-type: decimal;"> | |
| </ul> | |
| <script> | |
| var elem = { | |
| list : document.getElementById("todo-list"), |
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
| const SshPipe = require('./ssh-pipe.js'); | |
| ( async ( )=>{ | |
| const production = new SshPipe({ | |
| connent: { | |
| host: '******', | |
| user: '****', | |
| pass: '****', | |
| agent: process.env.SSH_AUTH_SOCK, | |
| agentForward: true, | |
| baseDir: '/home/var/www' |
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
| class Render{ | |
| constructor({ state, render}){ | |
| this.state = state | |
| this.log = [] | |
| this.step = render || (() => {}) | |
| this.render() | |
| } | |
| setState(input){ |
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 | |
| $data = [ | |
| (object) [ | |
| "id" => 1, | |
| "number" => 0, | |
| "text" => "000000000" | |
| ], | |
| (object) [ | |
| "id" => 1, | |
| "number" => 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
| FROM alpine:3.7 | |
| RUN apk update && apk add build-base | |
| # php7 | |
| RUN apk add \ | |
| php7 \ | |
| php7-json \ | |
| php7-phar \ | |
| php7-iconv \ |