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
## Setup Wireless Debugging on Android over local WiFi network ## | |
1. on your android phone: go to settings, and search for wireless debugging. tap on the "Pair device with pairing code" | |
a dialog will open with the necessary information for the computer | |
2. on your computer: open a command prompt terminal and navigate to the folder that contains adb.exe | |
3. on your computer: run the following terminal command: | |
adb.exe pair YOUR-LOCAL-IP-ADDRESS:ANDROID-PROVIDED-PORT-NUMBER ANDROID-PROVIDED-PAIR-NUMBER |
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
function myOnEdit() { | |
const RTDB_URL = "path/to/your/realtimedb/node.json"; | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
let data = sheet.getDataRange().getValues(); | |
let payload = {}; | |
for (let i = 0; i < data.length; i++) { | |
payload[data[i][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
let resource1; | |
let resource2; | |
function fetchResources() { | |
// works with any type of resource; image/audio/video/json/font/txt etc; | |
let r1 = fetch("./assets/resource/resource1.json").then((response) => { | |
return response.json(); | |
}); |
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
// launch.json | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "pwa-chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", | |
"port": 9222, |
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
<h1>Typing Animation</h1> | |
<p> | |
<!-- In order for the curser to stay on the same line as the typing text, the typing text element must be inside of a <p> tag --> | |
<span id="demo" class="typing cursor"></span> | |
</p> |
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 options = { | |
method: 'post', | |
headers: { | |
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8' | |
}, | |
body: 'json={data: "data"}' | |
} | |
let url = "post.php"; |
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
fetch("post.php", { | |
method: "post", | |
mode: "cors", | |
headers: { | |
"Content-Type": "application/json" | |
}, | |
body: {data: "data"} | |
}) | |
.then(response => { | |
return response.text(); // returns text that can used as html |
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
<!-- -- !IMPORTANT! -- MUST USE NAME INSTEAD OF ID FOR FORM ELEMENTS --> | |
<form id="form_id"> | |
<select name="select1"> | |
<option value="opt1" selected>Option 1</option> | |
<option value="opt2">Option 2</option> | |
<option value="opt3">Option 3</option> | |
</select> | |
<select name="select2"> | |
<option value="opt1" selected>Option 1</option> |
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 $ = (q) => {return document.querySelector(q);} |
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
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
NewerOlder