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
blueprint: | |
name: Plant Soil Moisture LED Indicator | |
description: > | |
Monitors a plant's soil moisture and controls an LED to provide visual feedback. | |
The LED will turn red when moisture is too low, yellow when moisture is too high, | |
and turn off when moisture is in the optimal range. | |
domain: automation | |
input: | |
plant_entity: | |
name: Plant Entity |
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
blueprint: | |
name: Home Assistant update notification | |
description: Send a notification when there's an update availiable for Home Assistant | |
domain: automation | |
input: | |
updater: | |
name: Update sensor | |
description: The sensor which indicates if there's an update | |
selector: | |
entity: |
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
/// twitch-videoad.js | |
const origFetch = window.fetch; | |
window.fetch = (url, init, ...args) => { | |
if (typeof url === "string") { | |
if (url.includes("/access_token")) { | |
url = url.replace("player_type=site", "player_type=site"); | |
} else if ( | |
url.includes("/gql") && | |
init && | |
typeof init.body === "string" && |
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/bash | |
SWITCH_ON_CMD="echo 'on 0' > /tmp/cec.fifo" | |
CHANGE_HDMI="echo 'as' > /tmp/cec.fifo" | |
if [ -e "/tmp/cec.fifo" ]; then | |
echo proceeding: file exists | |
else | |
echo You need to start the server. | |
exit | |
fi |
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
/* | |
* We want to auth our user on an application. | |
* We have two way to auth our user. | |
* We can either authenticate the user using his mail and password via Google, thanks to the Google SDK | |
* Or we can use the Facebook SDK to auth our user. | |
*/ | |
public GoogleAuthenticator() { | |
public String authenticateViaGoogle(String mail, String password) { | |
//Android code |
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
package com.magicmicky.loosecoopling; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.LayoutInflater; |
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
package com.magicmicky.testperfviews; | |
import android.app.Activity; | |
import android.graphics.LinearGradient; | |
import android.os.Debug; | |
import android.support.v7.app.ActionBarActivity; | |
import android.support.v7.app.ActionBar; | |
import android.support.v4.app.Fragment; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; |