Name | type:web | type:privileged | type:certified |
---|---|---|---|
geolocation | ! | ! | ! |
geolocation-noprompt | ✕ | ✕ | ✓ |
mmi-test | ✕ | ✕ | ✓ |
camera | ✕ | ! | ✓ |
alarms | ✓ | ✓ | ✓ |
tcp-socket | ✕ | ✓ | ✓ |
udp-socket | ✕ | ✓ | ✓ |
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
// Matrix with a strided array | |
class Matrix { | |
constructor (rows, cols) { | |
this.rows = rows; | |
this.cols = cols; | |
this.data = Array(rows * cols).fill(null); | |
} | |
get(x, y) { |
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 app = document.getElementById("app") | |
const render = (root) => { | |
let nodes = [] | |
return function(strings, ...expressions) { | |
if (root.childElementCount > 0 && nodes.length > 0 && nodes.length === expressions.length) { | |
// update nodes in list with matching expressions | |
nodes.forEach((node, idx) => { |
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
# Loan Calc | |
principle, interestRate, loanLength | |
principle * (interestRate / (1 - (1 + interestRate) ** -loanLength)) | |
Loan Amount, Monthly Interest Rate (1% = 0.01), Loan Length in Months | |
Per Month |
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
class Storage { | |
constructor(name) { | |
this.name = name; | |
this.read(); | |
} | |
// return data | |
list() { | |
return this.read(); | |
} |
- Device: /dev/ttyUSB2
- Service: LTE/UMTS/GPRS
- APN: Broadband
- record with simplescreenrecorder to mkv
- make frames:
mkdir frames
ffmpeg -i input -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png
- convert to gif
convert -loop 0 frames/ffout*.png output.gif
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
// Mobile fixes | |
// prevent scroll/refresh | |
document.addEventListener('touchmove', function(e) { | |
e.preventDefault(); | |
}, { passive: 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
#!/bin/sh | |
# Black 0;30 Dark Gray 1;30 | |
# Red 0;31 Light Red 1;31 | |
# Green 0;32 Light Green 1;32 | |
# Brown/Orange 0;33 Yellow 1;33 | |
# Blue 0;34 Light Blue 1;34 | |
# Purple 0;35 Light Purple 1;35 | |
# Cyan 0;36 Light Cyan 1;36 | |
# Light Gray 0;37 White 1;37 |
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
overview: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Optimizing_canvas | |
garbage collection: http://buildnewgames.com/garbage-collector-friendly-code/ | |
bitwise optimizations: https://galactic.ink/journal/2011/11/bitwise-gems-and-other-optimizations/ | |
perf: https://developers.google.com/web/tools/chrome-devtools/rendering-tools/ |
NewerOlder