I use this implementation on my RuneAudio player to play a sound when the raspberry pi is powered on.
-
Place your audio file in /var/local/
cp startupsound.mp3 /var/local/
-
Create /usr/bin/startupsound.sh with these contents:
// depends on fetch, async/await (node 8.2.1+) | |
require('isomorphic-fetch'); | |
const getAllPlatforms = async apiKey => { | |
const rawResponse = await fetch(`http://www.giantbomb.com/api/platforms?api_key=${apiKey}&format=json&field_list=name,id`); | |
const response = await rawResponse.json(); | |
// check response.error === "OK" && repsonse.status_code === 1 | |
return response.results; | |
} |
I use this implementation on my RuneAudio player to play a sound when the raspberry pi is powered on.
Place your audio file in /var/local/
cp startupsound.mp3 /var/local/
Create /usr/bin/startupsound.sh with these contents:
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on
Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband
var mongoObjectId = function () { | |
var timestamp = (new Date().getTime() / 1000 | 0).toString(16); | |
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() { | |
return (Math.random() * 16 | 0).toString(16); | |
}).toLowerCase(); | |
}; |