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> | |
<style> | |
#log { | |
display:block; | |
width: 100%; | |
height: 200px; | |
} | |
</style> | |
</head> |
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
fetch("https://adventofcode.com/2020/day/1/input").then(res => res.text()).then(text => text.split("\n").map(v => parseInt(v))).then(values => { | |
for(let i=0; i<values.length; i++) { | |
const v1 = values[i] | |
for(let j=i+1; j<values.length; j++) { | |
const v2 = values[j] | |
for(let l=j+1; l<values.length; l++) { | |
const v3 = values[l] | |
if( v1+v2+v3 === 2020) { | |
return v1*v2*v3 | |
} |
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
#!/bin/python3 | |
""" | |
sets F6 + vertical pad to set volume, F6 + horizontal pad to set brightness | |
""" | |
import evdev | |
import subprocess | |
BRIGHTNESS_PATH = "/sys/class/backlight/backlight/brightness" |
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
https://www.hackster.io/112938/kuman-tft-3-5-retropie-2018-a9b0c8 | |
dtoverlay=tft35a,rotate=270,fps=50,speed=31230000 | |
https://github.com/goodtft/LCD-show/issues/34 | |
Section "InputClass" | |
Identifier "calibration" | |
MatchProduct "ADS7846 Touchscreen" |
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
class Parent extends React.Component { | |
state = { | |
currentCell: null, | |
cells: [] | |
}; | |
onOpenCell = (cell) => { | |
this.setState({ | |
currentCell: cell, |
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> | |
<title>three.js webvr - roller coaster</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<!-- Origin Trial Token, feature = WebVR (For Chrome M59+), origin = https://threejs.org, expires = 2017-09-03 --> | |
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M59+)" data-expires="2017-09-03" content="Aqj+6XPnxHoSxQj/CDjGXhzrVFeP12/Pgvj7rfqFqVzodYX0ZXJNHTJIvCVExQfvip+Zq9GES+SOQ/zJlpceZgcAAABNeyJvcmlnaW4iOiJodHRwczovL3RocmVlanMub3JnOjQ0MyIsImZlYXR1cmUiOiJXZWJWUjEuMSIsImV4cGlyeSI6MTUwNDQ2NDIwNn0="> | |
<style> | |
body { |
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 pc = new RTCPeerConnection(); | |
var localVideo = document.getElementById('local'); | |
var remoteVideo = document.getElementById('remote'); | |
var isBroadcaster = document.location.hash.indexOf('broadcast') > -1; | |
var watcherId; | |
function broadcast(stream) { | |
localVideo.src = URL.createObjectURL(stream); | |
pc.addStream(stream); |
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.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; | |
var opts = { | |
type: window.PERSISTENT, | |
size: 1024*1024 | |
}; | |
function FileView(ul) { | |
var files = []; |
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
import haxe.Int32; | |
class Test { | |
static function main() { | |
// taken from https://github.com/HaxeFoundation/haxe/blob/development/tests/unit/src/unit/issues/Issue3414.hx.disabled | |
var x = 200015; | |
trace((((x << 28)) >> 28)); | |
trace(((x << 28) & 0xffffffff) >> 28); | |
var x32 : Int32 = 200015; |
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
FROM ubuntu:latest | |
MAINTAINER Ingensi labs <contact@ingensi.com> | |
RUN apt-get update | |
RUN apt-get -y upgrade | |
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server curl software-properties-common unzip | |
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
RUN DEBIAN_FRONTEND=noninteractive apt-add-repository -y ppa:webupd8team/java |
NewerOlder