sudo pip3 install python-vlc
sudo apt-get install python3-rpi.gpio
Or for python2
// https://jrsinclair.com/articles/2019/how-to-run-async-js-in-parallel-or-sequential/ | |
const job = (name, delay) => | |
new Promise((res) => { | |
setTimeout(() => { | |
console.log(`Job(${name}) resolving after ${delay}`); | |
res(); | |
}, delay); | |
}); |
#!/usr/local/bin/ruby | |
require "curses" | |
include Curses | |
begin | |
init_screen | |
crmode | |
x = 0 | |
y = 0 |
<!-- | |
kindly provided by 'Knapster' | |
Ref: http://forum.kodi.tv/showthread.php?tid=139145&pid=1285390#pid1285390 | |
--> | |
<keymap> | |
<global> | |
<remote> | |
<channelplus>Notification(Keypress, channelplus, 1)</channelplus> | |
<channelminus>Notification(Keypress, channelminus, 1)</channelminus> |
// | |
// Person.js | |
// | |
// This is a simple Person class. | |
// | |
// It doesn't do much, but it demonstrates the use of ES6 classes. Note that | |
// this code will most likely not work in old browsers directly. To 'compile' | |
// this down to the more widely accepted ES5, you could use Babel. | |
// |
// https://gist.github.com/mjackson/5311256 | |
// http://xahlee.info/js/js_convert_decimal_hexadecimal.html | |
/** | |
* Converts an RGB color value to HSV. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSV_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and v in the set [0, 1]. | |
* | |
* @param Number r The red color value |
# https://www.youtube.com/watch?v=Ct6BUPvE2sM | |
def ouhh(left, right) | |
if left == "pen" && right == "apple" | |
"apple-pen" | |
elsif left == "pen" && right == "pineapple" | |
return "pineapple-pen" | |
elsif left == "apple-pen" && right == "pineapple-pen" | |
return "pen-pineapple-apple-pen" | |
end |