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
| console.log("%c TEST TEST 55+!", "font: 2em roboto; color: yellow; background-color: green;"); |
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
| //Constant | |
| const irc = require('irc'), | |
| request = require('request'), | |
| express = require('express'), | |
| bodyParser = require('body-parser'), | |
| env = process.env; | |
| const VERIFY_TOKEN = 'โทเคนสำหรับ verify hook ของ facebook'; | |
| const ACCEPTED_UID = 'ไอดีของ user เฟสบุ๊คเรา ที่ใช้ส่งข้อความ'; | |
| const PAGE_TOKEN = 'โทเคนของเพจ (Life Time token)'; | |
| const ircConfig = { |
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
| collections: | |
| score: | |
| output: true | |
| defaults: | |
| - | |
| scope: | |
| type: "score" | |
| values: | |
| layout: "score" |
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() { | |
| $('#searchForm').submit(function(e){ | |
| e.preventDefault(); | |
| var uid = $('#uid').val().trim(); | |
| var email = $('#email').val().trim(); | |
| email = email.toLowerCase(); | |
| window.location.assign('score/'+md5(uid+'|'+email)); | |
| }); | |
| }); |
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
| --- | |
| layout: default | |
| --- | |
| <div class="container" style="margin-top:20px;"> | |
| <div> | |
| ชื่อ: {{page.name}} | |
| </div> | |
| <div> | |
| รหัสนักศึกษา: {{page.uid}} | |
| </div> |
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 FILENAME = ["group01.csv","group02.csv","group03.csv"]; | |
| const fs = require("fs"); | |
| const csv = require("fast-csv"); | |
| const md5 = require('md5'); | |
| const YAML = require('yamljs'); | |
| var writeCollection = function(path,data,callback){ | |
| var output = "---\n"+ YAML.stringify(data) + "---"; | |
| fs.writeFile(path,output,function(err){ | |
| if(!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
| #อย่าลืมสร้าง error.html ด้วย | |
| ErrorDocument 500 /error.html | |
| ErrorDocument 503 /error.html | |
| ErrorDocument 508 /error.html |
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
| #อย่าลืมสร้าง error.html ด้วย | |
| ErrorDocument 500 /error.html | |
| ErrorDocument 503 /error.html | |
| ErrorDocument 508 /error.html |
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
| var path = window.location.pathname; | |
| path = decodeURIComponent(path).substring(1).replace(/\//g, "|"); | |
| if(path.trim().length != 0){ | |
| var config = { | |
| apiKey: "", | |
| databaseURL: "", | |
| }; | |
| firebase.initializeApp(config); | |
| firebase.database().ref("path/"+path).once("value").then(function(snapshot) { | |
| var route = snapshot.val(); |
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
| <script src="https://www.gstatic.com/firebasejs/4.0.0/firebase-app.js"></script> | |
| <script src="https://www.gstatic.com/firebasejs/4.0.0/firebase-database.js"></script> | |
| <script src="router.js"></script> |