This file contains 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 fs = require('fs'); | |
var paths = [ | |
__dirname+"/data", | |
__dirname, | |
]; | |
mimeTypes = { | |
"html": "text/html", | |
"htm": "text/html", |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<video id="video" autoplay playsinline></video> | |
<canvas id="canvas" onclick="this.webkitRequestFullscreen()"></canvas> | |
<style>:-webkit-full-screen {position:fixed;width:100%;height:auto;top:0;left:0;}</style> |
This file contains 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
#show settings: | |
uci show wireless | |
#edit settings | |
uci set wireless.radio0=wifi-device | |
uci set wireless.radio0.type='mac80211' | |
uci set wireless.radio0.channel='36' | |
uci set wireless.radio0.hwmode='11a' | |
uci set wireless.radio0.htmode='VHT80' | |
uci set wireless.radio0.distance='2' | |
uci set wireless.wifinet1=wifi-iface |
This file contains 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
#setup router as '192.168.1.200' in router settings | |
uci set network.lan.ipaddr='192.168.1.1' | |
uci set network.lan.gateway='192.168.1.200' | |
uci set network.lan.dns='8.8.8.8' | |
uci commit && service network restart |
This file contains 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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script id="vshader" type="VERTEX_SHADER"> | |
uniform mat4 position; | |
uniform mat4 camera; | |
attribute vec3 aVertexPosition; | |
void main() { | |
gl_Position = position * camera * vec4(aVertexPosition, 0.9); |
This file contains 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
cd %~dp0 | |
"%PROGRAMFILES(X86)%\Google\Chrome\Application\chrome.exe" --app=http://localhost:8000/index.html | node.exe server.js | |
pause |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script type="text/javascript"> | |
function ascript(src){ | |
return new Promise((resolve, reject) => { | |
let script2 = document.createElement('script'); | |
script2.async = true; |
This file contains 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
#update nodejs | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable | |
#macos python -> ssh -> win10 | |
cat helloworld.py | ssh username@192.168.1.4 python - | |
#all webm to mp4 | |
for f in *.webm; do ffmpeg -fflags +genpts -i "$f" -r 24 "$f.mp4"; done |
This file contains 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
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0/dist/tf.min.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-vis@1.0.2/dist/tfjs-vis.umd.min.js"></script> | |
<script> | |
function plot(x,y,z) { | |
var [x_,y_,z_] = [x,y,z||y].map( (t)=>t.arraySync() ); | |
var p = x_.map(function(x__,i){return {x:x__,y:y_[i]} }); | |
var p1 = x_.map(function(x__,i){return {x:x__,y:z_[i]} }); | |
tfvis.render.scatterplot({name:"",tab:'Charts'},{values:[p,p1]}); |
This file contains 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
window.speechSynthesis.speak(new SpeechSynthesisUtterance("From fairest creatures we desire increase, That thereby beauty's rose might never die, But as the ripershould by time decease,His tender heir might bear his memory")); |
OlderNewer