Skip to content

Instantly share code, notes, and snippets.

@Oliv4945
Oliv4945 / UBPorts - BT backport notes.md
Last active April 16, 2021 06:10
UBPorts - BT backport notes

Feedback on the text

Required tools

spatch can be installed under Debian/Ubuntu with apt install coccinelle.

Download 4.2 kernel sources

What is the aim of creating kernel-backports folder?

Run backports script and fix errors

@Oliv4945
Oliv4945 / temperature_tower.py
Last active February 12, 2024 15:11
Add regular temperature changes to a gcode file, useful for temperature towers
# -*- coding: utf-8 -*-
# Usage: python file 8 215 5
import argparse
import os
import re
parser = argparse.ArgumentParser()
parser.add_argument("file", help="Input GCode file to be parserd", type=str)
version: '3.5'
services:
db:
image: mariadb
container_name: mariadb
command: '--transaction-isolation=READ-COMMITTED --binlog-format=ROW'
restart: unless-stopped
volumes:
- 'db:/var/lib/mysql'
@Oliv4945
Oliv4945 / 01-go.yml
Last active February 4, 2016 23:17
Ansible script to compile and use Go with gvm
---
- hosts: all
#gather_facts: no
sudo: no
user: pi
tasks:
- name : install GVM
@Oliv4945
Oliv4945 / ioPush_Post_Arduino.ino
Created January 9, 2016 10:56
Example to send data from an Arduino to http://ioPush.net
/*
Web client sketch for IDE v1.0.1 and w5100/w5200
Uses POST method.
Posted November 2012 by SurferTim
*/
/*
* Modified the 09/01/2016 to send data to http://ioPush.net
*/
#include <SPI.h>
@Oliv4945
Oliv4945 / README.md
Last active August 29, 2015 14:24 — forked from bigmonkeyboy/README.md

This gist creates an init.d script to automatically run Node-RED at boot time.

To run it as a single step you can cut paste the following single line command

From https://gist.github.com/bigmonkeyboy/ , thanks !

sudo wget -O /tmp/download https://gist.github.com/Oliv4945/ebf2a6275eb35a339bf2/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults

or click right-click "save as" this link - But please read the script first and satisfy yourself it's safe to execute in your environment...

@Oliv4945
Oliv4945 / CodeBorneArcadeLOG
Created June 27, 2015 07:15
Code borne Arcade LOG
/* Arcade Keyboard-Joystick */
#define NUM_BUTTONS 24
int keys[NUM_BUTTONS] = {KEY_RIGHT, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_ENTER, MODIFIERKEY_SHIFT, KEY_A, KEY_S, KEY_Z, KEY_X, KEY_Q, KEY_W, KEY_1, KEY_2, KEY_4, KEY_5, KEY_7, KEY_8, KEY_9, KEY_R, KEY_O, KEY_V, KEY_B, KEY_C};
long mask = 0;
int i = 0;
void setup() {
@Oliv4945
Oliv4945 / Install NoteRF
Last active December 19, 2016 08:48
In progress...
# Changes default shell to bash
chsh -s /bin/bash
su
# Update distribution
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
# Update from wheezy to jessie
sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
@Oliv4945
Oliv4945 / NodeRedFlowAirQualityGrenoble
Created January 29, 2015 08:41
Node-Red flow for Air Quality in Grenoble
[{"id":"53bd85c0.99ddac","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":"Node-Red"},{"id":"2c75144.fd38aec","type":"http request","name":"Get pollution Grenoble","method":"GET","url":"http://feeds.feedburner.com/atmorhonealpes_indicequaliteair_grenoble","x":170,"y":230,"z":"adc463f6.523ba","wires":[["315dd6ea.cea22a"]]},{"id":"6f1dc1f8.90e24","type":"inject","name":"Start flow","topic":"","payload":"","payloadType":"date","repeat":"1440","crontab":"","once":true,"x":92,"y":165,"z":"adc463f6.523ba","wires":[["2c75144.fd38aec"]]},{"id":"315dd6ea.cea22a","type":"xml","name":"","x":160,"y":295,"z":"adc463f6.523ba","wires":[["6c293291.93d6cc"]]},{"id":"78cdab88.873254","type":"change","action":"replace","property":"url","from":"","to":"msg.payload.rss.channel[0].item[0].link[0]","reg":false,"name":"Parse RSS to extract URL","x":431,"y":303,"z":"adc463f6.523ba","wires":[["933c52e6.6cc3b"]]},{"id":"6c293291.93d6cc","type":"switch","name":"Check HTTP status","property":"statusCode","rules":[{"t":"