I backed the [GPD Pocket] project on Indiegogo immediately after its launch announcement. I had to wait for a few extra months from their estimated release date (it seems they had some technical issues with Linux driver development) then finally got a device last week. The production quality is still not perfect but significantly improved from the previous product (GPD Win) -- I can admit that I'm almost satisfied with it.
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
| // Vue component for loading minimal fonts with webfontloader | |
| <template> | |
| </template> | |
| <script> | |
| //https://github.com/typekit/webfontloader | |
| import WebFontLoader from 'webfontloader'; | |
| export default { |
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
| renderer = new THREE.WebGLRenderer({preserveDrawingBuffer: true}); | |
| renderer.autoClearColor = 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
| taskkill /F /IM Chrome.exe /T | |
| ### Open a local index.html file in the same directory as this batch file | |
| # start chrome --kiosk --profile-directory=Default --app="%~dp0/index.html" | |
| ### Open a website URL | |
| start chrome --kiosk --profile-directory=Default --app="http://google.com" |
You can run your Express app very easily inside your Electron app.
All you need to do is to:
- place all the files of your Express app inside a new app folder in
your_electron_app\resources\app - reconfigure the
app.jsfile - refactor some relative pathes in your Express app
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
| // http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ | |
| "use strict"; | |
| process.title = 'node-serial-ws'; | |
| // Websocket | |
| var webSocketsServerPort = 1337; | |
| var webSocketServer = require('websocket').server; | |
| var http = require('http'); | |
| var server = http.createServer(function(request, response) { | |
| // Not important for us. We're writing WebSocket server, not HTTP server |
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
| /** | |
| * To convert between typed arrays an ArrayBuffer can be used to create | |
| * TypedArray's from one type to another. Each typed array has a property | |
| * which is an ArrayBuffer. | |
| **/ | |
| var uint16 = new Uint16Array([0x0102, 0x0304]); | |
| var uint32 = new Uint32Array(uint16.buffer); | |
| var uint8clamped = new Uint8ClampedArray(uint16.buffer); | |
| var uint8 = new Uint8Array(uint16.buffer); |
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
| // to add new icons, add the file to the media/icons folder | |
| // then add the name of the file to the $icon-list | |
| // each item will get a class name that matches the file name | |
| $icon-list: add_widget alert appointments back blood_glucose blood_pressure chat collapse expand find_doctor fitness_planner food_journal github internet linkedin medical_history medication message nav_back nav_next overview patient_directory personal_profile recipe regimen_plan search settings sleep_analysis widget_directory | |
| // all parent elements that need to trigger icon hover | |
| $parents: '.btn' '.widget-button' | |
| =all-icons | |
| @each $icon in $icon-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
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| var hbs = require('hbs'); | |
| app.set('view engine', 'html'); | |
| app.engine('html', hbs.__express); | |
| app.use(express.json()); | |
| app.use(express.urlencoded()); |
NewerOlder
