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
| <template> | |
| <div class="toggle-dark-theme"> | |
| Dark theme | |
| <label class="switch"> | |
| <input type="checkbox" checked id="toggle-dark-theme"> | |
| <span class="slider round"></span> | |
| </label> | |
| </div> | |
| </template> |
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 generateArrays = (limit = 600, arraySize = 36, min = 1, max = 99) => { | |
| let currentIndex = max - arraySize + 2; | |
| const result = []; | |
| while (result.length < limit) { | |
| const initArray = [null]; | |
| const nextIndex = currentIndex + (arraySize - 1); | |
| for (let i = currentIndex; i <= nextIndex; i++) { | |
| initArray.push(i); |
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
| [user] | |
| name = Son Tran | |
| email = [email protected] | |
| [alias] | |
| s = status | |
| ck = checkout | |
| l1l = log --oneline | |
| br = branch |
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
| [user] | |
| name = Son Tran | |
| email = [email protected] | |
| [alias] | |
| s = status | |
| ck = checkout | |
| l1l = log --oneline | |
| br = branch |
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 toggle = document.createElement('div'); | |
| var sidebar = document.getElementById('sidebar'); | |
| toggle.innerHTML = '>'; | |
| toggle.classList.add('toggle-sidebar'); | |
| toggle.classList.add('open'); | |
| toggle.addEventListener('click', function() { | |
| sidebar.classList.toggle('hidden'); | |
| toggle.classList.toggle('open'); | |
| setTimeout(function() { | |
| toggle.innerHTML = sidebar.classList.contains('hidden') ? '<' : '>'; |
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 button = document.createElement('div'); | |
| button.innerHTML = '>'; | |
| button.setAttribute('id', 'sidbar-collapse'); | |
| var sidebar = document.getElementById('sidebar'); | |
| button.onclick = () => { | |
| sidebar.classList.toggle('collapse'); | |
| button.innerHTML = button.innerText == '>' ? '<' : '>'; | |
| }; | |
| sidebar.appendChild(button); | |
| button.click(); |
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
| upload(files) { | |
| const config = { | |
| onUploadProgress: function(progressEvent) { | |
| var percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total ) | |
| console.log(percentCompleted) | |
| } | |
| } | |
| let data = new FormData() | |
| data.append('file', files[0]) |
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
| server { | |
| # ... | |
| # handle OPTIONS requests from window.fetch | |
| if ($request_method = OPTIONS ) { | |
| add_header Access-Control-Allow-Origin "*"; | |
| add_header Access-Control-Allow-Methods "GET, OPTIONS"; | |
| add_header Access-Control-Allow-Headers "Authorization,content-type"; | |
| add_header Access-Control-Allow-Credentials "true"; |
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
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| root /your/root/path; | |
| index index.html; | |
| server_name you.server.com; |
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
| //------------------------------------------------------------------------------ | |
| // geotool.js - version 1.0.0 | |
| // | |
| // Copyright (c) 2005 Craftworks Corp. All Right Reserved. | |
| // | |
| // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Lesser General Public | |
| // License as published by the Free Software Foundation; either | |
| // version 2.1 of the License, or (at your option) any later version. | |
| // |