Skip to content

Instantly share code, notes, and snippets.

@superj80820
superj80820 / index.html
Last active April 6, 2019 10:48
ar-card
<script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
<script src="https://rawgit.com/jeromeetienne/ar.js/master/aframe/build/aframe-ar.js"></script>
<script>THREEx.ArToolkitContext.baseURL = 'https://rawgit.com/jeromeetienne/ar.js/master/three.js/'</script>
<body style='margin : 0px; overflow: hidden;'>
<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false;'>
<a-marker type='pattern' url='res/pattern-marker.patt'>
<a-entity position='-3 2 0' text="width: 5; value:I am Psyduck. We are pokemon. We love you"></a-entity>
<a-entity position='0 0 0' gltf-model="url(res/scene.gltf)"></a-entity>
</a-marker>
@superj80820
superj80820 / step-1
Last active February 2, 2020 09:56
ar-card
mkdir <你的專案名稱>
cd <你的專案名稱>
git init
heroku login
heroku create <你的專案名稱>
heroku buildpacks:set heroku/nodejs
@superj80820
superj80820 / step-2
Created April 6, 2019 07:53
ar-card
git add .
git commit -m "initial commit"
git push heroku master
| index.html
| package.json
\---res
duck.zip
marker.png
pattern-marker.patt
scene.bin
scene.gltf
{
"name": "my-static-site",
"version": "1.0.0",
"description": "This will load any static html site",
"scripts": {
"start": "harp server --port $PORT"
},
"dependencies": {
"harp": "*"
}
@superj80820
superj80820 / chrome-remote-desktop
Created April 18, 2019 03:09
chrome-remote-desktop
#!/usr/bin/python2
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Virtual Me2Me implementation. This script runs and manages the processes
# required for a Virtual Me2Me desktop, which are: X server, X desktop
# session, and Host process.
# This script is intended to run continuously as a background daemon
# process, running under an ordinary (non-root) user account.
@superj80820
superj80820 / bash
Created October 10, 2019 18:56
Fix no sound of chrome youtube
killall pulseaudio
rm -r ~/.config/pulse/*
rm -r ~/.pulse*
@superj80820
superj80820 / 用Line來對發票吧!(限IOS)
Created November 28, 2019 14:31
用Line來對發票吧!(限IOS)
# 用Line來對發票吧!(限IOS)
Hi 大家好 不知道大家是否最近有更新Line呢?
最近最新版的Line讓QR-Code掃描的功能變得更完整惹!
以前只能掃網址跟朋友的條碼 但現在也能掃描**發票**之類其他的QR-Code了(限IOS)!
正逢這幾天剛好又是對發票的日子 我想說把這新功能跟Line機器人做個整合好了 想說或許對平時沒有載發票軟體但是這幾天要對發票的人有幫助 於是就有了這個:
**發票大獅兄**
![](https://i.imgur.com/TL0j4r3.png)
@superj80820
superj80820 / 🐭Netflix邊看邊做事的小工具
Created January 29, 2020 15:35
🐭Netflix邊看邊做事的小工具
先看看成品 可以讓Netflix以一個小視窗顯示在螢幕上方 然後邊做事邊看片(可顯示字幕)
![](https://i.imgur.com/C5xRCUN.gif)
大家新年快樂(不想開工啊~~)
可能是小時候常常邊看周星馳的關係
總是會喜歡邊聽星爺的影片邊做事
最近剛好又買了Netflix 發現有一堆星爺片
所以想說做個Chrome插件 讓做事的時候能夠順便看片
並且可顯示字幕 這樣也可以看外國片~
@superj80820
superj80820 / one.js
Last active February 28, 2020 02:00
Handle js async error
function requestAPI() { //requestDB 實作都類似只是reject的error不同
return new Promise((resolve, reject) => {
request('https://A.com', (error, data) => {
if (error) reject(new customError("I'am requestAPI",error))
else resolve(data)
})
})
}
// main