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
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
bold=$(tput bold) | |
dim=$(tput dim) | |
off=$(tput sgr0) | |
thumb () { | |
case $1 in | |
0) printf "\xF0\x9F\x91\x8d" ;; | |
*) printf "\xF0\x9F\x91\x8e $red($1)$off" ;; |
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 | |
modprobe -r ec_sys | |
modprobe ec_sys write_support=1 | |
on="\x8a" | |
off="\x0a" | |
led(){ | |
echo -n -e $1 | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null |
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
[Unit] | |
Description=Beanstalkd is a simple, fast work queue | |
[Service] | |
User=nobody | |
Restart=always | |
RestartSec=500ms | |
ExecStart=/usr/local/bin/beanstalkd -b /var/lib/beanstalkd | |
LimitNOFILE=10240 |
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
# Tweepy API documentation: http://docs.tweepy.org/en/latest/index.html | |
# Vorher mit 'pip install tweepy' Tweepy installieren | |
# Twitter App registrieren unter https://apps.twitter.com/ | |
import tweepy | |
auth = tweepy.OAuthHandler("Consumer Key (API Key)", "Consumer Secret (API Secret)") | |
auth.set_access_token("Access Token", "Access Token Secret") |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
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
domain,ttl,aaaa-ttl,cname-ttl,miltiple-ttls,ns-root,ns-ttl,a-count,aaaa-count,a-records,aaaa-records,ns-records,cname | |
facebook.com,300,300,,false,facebook.com,128517,1,1,"31.13.66.36","2a03:2880:f113:83:face:b00c:0:25de","a.ns.facebook.com.,b.ns.facebook.com.", | |
twitter.com,300,,,false,dynect.net,42239,4,0,"199.16.156.102,199.16.156.198,199.16.156.70,199.16.156.230","","ns1.p34.dynect.net.,ns3.p34.dynect.net.,ns4.p34.dynect.net.,ns2.p34.dynect.net.", | |
google.com,300,300,,false,google.com,128501,1,1,"216.58.209.14","2a00:1450:4017:803:0:0:0:200e","ns3.google.com.,ns4.google.com.,ns1.google.com.,ns2.google.com.", | |
youtube.com,300,300,,false,google.com,128505,1,1,"216.58.209.206","2a00:1450:4017:803:0:0:0:200e","ns3.google.com.,ns4.google.com.,ns1.google.com.,ns2.google.com.", | |
wordpress.org,600,,,false,wordpress.org,54943,2,0,"66.155.40.249,66.155.40.250","","ns4.wordpress.org.,ns3.wordpress.org.,ns1.wordpress.org.,ns2.wordpress.org.", | |
linkedin.com,300,300,,false,dynect.net,47775,1,1,"108.174.10.10","2620:109:c002: |
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
// This #include statement was automatically added by the Particle IDE. | |
#include "MQTT/MQTT.h" | |
#define RECONNECT 15*1000 | |
#define CLIENT_NAME "MagicLight-Spark" | |
byte server[] = { 10,0,1,250 }; | |
MQTT client(server, 1883, callback); | |
bool init = true; |
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
/* | |
OTA update over HTTPS | |
As an example, we download and install ESP8266Basic firmware from github. | |
Requires latest git version of the core (November 17, 2015) | |
Created by Ivan Grokhotkov, 2015. | |
This example is in public domain. | |
*/ |
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
// This #include statement was automatically added by the Particle IDE. | |
#include "MQTT/MQTT.h" | |
#include "HTU21D/HTU21D.h" | |
int mqtt_port = 1883; | |
byte mqtt_host[] = { 192,168,1,4 }; | |
String device_id = System.deviceID(); | |
String mqtt_topic_temp = "sensors/"+ device_id + "/temp"; | |
String mqtt_topic_humidty = "sensors/" + device_id + "/humidity"; |
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
#include <SoftwareSerial.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266mDNS.h> | |
#include <ArduinoOTA.h> | |
#include <SoftwareSerial.h> | |
#include <Ticker.h> | |
const char* ssid = "Bembun"; | |
const char* password = "ananasakaama"; |
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
/*********************************** | |
This is our GPS library | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! | |
Written by Limor Fried/Ladyada for Adafruit Industries. | |
BSD license, check license.txt for more information | |
All text above must be included in any redistribution |