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
| import { reactive, readonly } from 'vue' | |
| export interface IColorScheme { | |
| colorScheme: 'dark' | 'light' | |
| isDarkMode: boolean | |
| } | |
| const state = reactive<IColorScheme>({ | |
| colorScheme: 'light', | |
| isDarkMode: false |
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
| document.getElementsByTagName('button')[0].onclick = function () { | |
| scrollTo(document.body, 0, 1250); | |
| } | |
| function scrollTo(element, to, duration) { | |
| var start = element.scrollTop, | |
| change = to - start, | |
| currentTime = 0, | |
| increment = 20; | |
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
| # Batch convert all .ppt/.pptx files encountered in folder and all its subfolders | |
| # The produced PDF files are stored in the invocation folder | |
| # | |
| # Adapted from http://stackoverflow.com/questions/16534292/basic-powershell-batch-convert-word-docx-to-pdf | |
| # Thanks to MFT, takabanana, ComFreek | |
| # | |
| # If PowerShell exits with an error, check if unsigned scripts are allowed in your system. | |
| # You can allow them by calling PowerShell as an Administrator and typing | |
| # ``` | |
| # Set-ExecutionPolicy Unrestricted |
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 shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) { | |
| // Someone tried to run a second instance, we should focus our window. | |
| if (mainWindow) { | |
| if (mainWindow.isMinimized()) mainWindow.restore(); | |
| mainWindow.focus(); | |
| } | |
| }); | |
| if (shouldQuit) { | |
| app.quit(); |
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 gulp = require('gulp'); | |
| var connect = require('gulp-connect'); | |
| gulp.task('connect', function() { | |
| connect.server({ | |
| root: 'app', | |
| livereload: true | |
| }); | |
| }); | |