- ติดตั้ง Laravel
$ cd <workspace> $ docker run --rm --interactive --tty \\ --volume $PWD:/app \\ composer create-project --prefer-dist laravel/laravel laravel-blog
- เข้า phpdocker.io/generator ตั้งชื่อโปรเจค "laravel-blog"
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
| function makeid(length) { | |
| var result = ''; | |
| var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
| var charactersLength = characters.length; | |
| for ( var i = 0; i < length; i++ ) { | |
| result += characters.charAt(Math.floor(Math.random() * charactersLength)); | |
| } | |
| return result; | |
| } |
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 SSH = require('simple-ssh'); | |
| const ssh = new SSH({ | |
| host: '<Host Server>', | |
| user: '<Username>', | |
| pass: '<Password>', | |
| agent: process.env.SSH_AUTH_SOCK, | |
| agentForward: true, | |
| }); |
kiosk คือเครื่องให้บริการแบบเป็นตู้ๆ วางไว้ตามที่ต่างๆ ที่ำกันสิทธิของ User ให้ทำได้แค่ไม่กี่อย่าง
- สร้าง shortcut ของ Chrome
- คลิกขวาเปิด Properties
- ที่ช่อง target เพิ่ม
...chrome.exe" --kiosk --kiosk-print --overscroll-history-navigation=0 "https://gist.github.com/"อาจจะแก้เป็นเว็บที่เราต้องการ--kiosk- เปิดโหมด kiosk--kiosk-print- เพิ่มซ่อน dialog print จาก User
--disable-pinch- เพื่อให้จอ kiosk ของ Zoom ไม่ได้ Lock การ Zoom นั้นเอง
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] | |
| </IfModule> |
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/php | |
| <?php | |
| $olddom = new DOMDocument('1.0', 'utf-8'); | |
| $olddom->loadHTMLFile('arc.html'); | |
| $boby = $olddom->getElementsByTagName('body')->item(0); | |
| $boby->insertBefore( | |
| $olddom->createElement('h1', 'Zippy'), | |
| $olddom->getElementsByTagName('p')->item(0) |
pip3 install jupyterlabMac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)View
solved this problem using this command:
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
| # pin3 install numpy | |
| # pin3 install BeautifulSoup | |
| import requests | |
| import numpy | |
| from bs4 import BeautifulSoup | |
| def getContent(url): | |
| page = requests.get(url) | |
| soup = BeautifulSoup(page.content, 'html.parser') |