Skip to content

Instantly share code, notes, and snippets.

Oriol Rius oriolrius

Block or report user

Report or block oriolrius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oriolrius
oriolrius / echo_client.ino
Created Nov 25, 2019
Exemple inspirat en un company, PLA5 - echo_client.ino
View echo_client.ino
#include <SPI.h>
#include <WiFi101.h>
#include "arduino_secrets.h"
WiFiClient client;
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
int status = WL_IDLE_STATUS;
#define PORT 7
@oriolrius
oriolrius / MKREnv101_Wifi.ino
Created Nov 4, 2019
PLA7 - Actividad 3 - Parte 2
View MKREnv101_Wifi.ino
#include <FlashAsEEPROM.h>
#include <FlashStorage.h>
#include <Adafruit_SleepyDog.h>
#include <Arduino_MKRENV.h>
#include <WiFi101.h>
#include <RTCZero.h>
#include <MQTT.h>
#include <MQTTClient.h>
#include "arduino_secrets.h"
@oriolrius
oriolrius / Grafana Telegraf Monitoring.json
Created May 21, 2019
Confinguration file for Grafana, it uses telegraf information from influxdb.
View Grafana Telegraf Monitoring.json
{
"__inputs": [
{
"name": "DS_MONITORING_SH0",
"label": "monitoring_sh0",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@oriolrius
oriolrius / placa_solar.svg
Created Aug 14, 2018
this is a SVG file used for my hot water solar system
View placa_solar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oriolrius
oriolrius / bash.ahk
Last active Jul 18, 2018
Youtube video: https://youtu.be/B1wMVIObXR4 --- Your linux shell just one click away using Widows 10. Autohotkey allows key binds to super powerful scripts, thanks to that I created a small script for assigning my WSL bash shell to the F1 button and show/hide the shell everytime I click the F1. This is exactly how I do that in linux using Yakuake.
View bash.ahk
#WinActivateForce
#SingleInstance force
runApp(exe) {
IfWinExist, ahk_exe %exe%
{
IfWinActive
{
WinMinimize
return
@oriolrius
oriolrius / preparing_data_for_nextion.js
Created Jul 4, 2018
This is the code that I have in the node which prepares data before it is sent to the Nextion serial protocol.
View preparing_data_for_nextion.js
var str = msg.payload;
var buf = [];
for (var i=0, l = str.length; i < l; i++) {
var ascii = str.charCodeAt(i);
buf.push(ascii);
}
buf.push(255);
buf.push(255);
buf.push(255);
@oriolrius
oriolrius / grafana-script-test.js
Created Nov 29, 2017
this is a hello world test for grafana scripted dashboards, please refer to this video for more information: http://oriolrius.cat/blog/2017/11/24/scripted-grafana-dashboards/
View grafana-script-test.js
'use strict';
var dashboard;
dashboard = {
title: 'this is just a test',
rows : [],
};
dashboard.time = {
You can’t perform that action at this time.