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
pushbullet.py>=0.11.0 | |
urllib3>=1.25.9 |
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/python | |
# -*- coding: utf-8 -*- | |
#pip install git+https://github.com/Azelphur/pyPushBullet.git | |
from pushbullet.pushbullet import PushBullet | |
import json, os | |
# Sensor ID (/sys/bus/w1/devices/{SENSOR_ID}/w1_slave) | |
SENSOR_ID = "xxx" |
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/env node | |
var http = require('http'); | |
var https = require('https'); | |
var retreiveDatas = function(url){ | |
return new Promise((resolve, reject) => { | |
var proto = https; | |
if (url.indexOf("http://") == 0) |
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/python | |
# -*- coding: utf-8 -*- | |
import glob, os, sys | |
from datetime import datetime | |
def get_temp(device_file): | |
temp_c = 0 |
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
<?php | |
/** | |
* Seconds to human readable text | |
* Eg: for 36545627 seconds => 1 year, 57 days, 23 hours and 33 minutes | |
* | |
* @return string Text | |
*/ | |
function getHumanTime($seconds) | |
{ |
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
SELECT lastname, UPPER(lastname) | |
FROM people | |
WHERE lastname = BINARY UPPER(lastname); |
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
SELECT | |
DATE_ADD(CURRENT_DATE, INTERVAL(2-DAYOFWEEK(CURRENT_DATE)) DAY) AS start_day, | |
DATE_ADD(CURRENT_DATE, INTERVAL(8-DAYOFWEEK(CURRENT_DATE)) DAY) AS end_day; |