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
int relayPin = 2; | |
int moisturePin = A0; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("Setup, wait"); | |
// Relay management | |
pinMode(relayPin, OUTPUT); |
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
{ | |
"anytime" : [ | |
"Hej sexi" | |
], | |
"morning" : [ | |
"Dzień dobry" | |
], | |
"evening" : [ | |
"Dobry wieczór" | |
], |
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 homeassistant.const import TEMP_CELSIUS | |
from homeassistant.helpers.entity import Entity | |
def setup_platform(hass, config, add_devices, discovery_info=None): | |
"""Setup the sensor platform.""" | |
add_devices([ExampleSensor()]) | |
class ExampleSensor(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
import java.io.IOException; | |
import java.lang.reflect.Type; | |
import java.util.Scanner; | |
import retrofit.converter.ConversionException; | |
import retrofit.converter.Converter; | |
import retrofit.mime.TypedInput; | |
import retrofit.mime.TypedOutput; | |
import retrofit.mime.TypedString; |
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
@Override | |
public void showToolbar() { | |
toolbar.animate() | |
.setInterpolator( new AccelerateInterpolator() ) | |
.translationY( 0 ) | |
.start(); | |
} |
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 | |
expect -c ' | |
set timeout -1; | |
spawn android - update sdk --no-ui; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' |
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
#!/usr/bin/php5 | |
<?php | |
$options = getopt("s:t:"); | |
if( !array_key_exists("s", $options)){ | |
throw new Exception('Missing source directory option -s /source/path'); | |
} | |
if( !array_key_exists("t", $options)){ |
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
#!/usr/bin/php -q | |
<?php | |
/** | |
* Collect required arguments | |
**/ | |
if( count( $argv ) != 5 ){ | |
die( "\nMissing arguments\n\ntvshows <sidereel_user> <sidereel_password> <transmission_user> <transmission_password>\n\n" ); | |
} |
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 | |
SEARCH_DIR=$1 | |
if [ -z "$SEARCH_DIR" ]; then | |
echo "Missing first argument, provide path" | |
exit | |
fi | |