Skip to content

Instantly share code, notes, and snippets.

View steviee's full-sized avatar

Stephan Eberle steviee

View GitHub Profile
@steviee
steviee / sensor.ino
Created July 11, 2017 14:31
NRF24l01 sender....
#include <RF24.h>
#include <SPI.h>
// PIR variables
byte pirPin = 2;
int pirCalibrationTime = 30;
// Radio with CE & CSN connected to pins 7 & 8
RF24 radio(7, 8);
#!/bin/bash
# Update system
sudo apt-get update && sudo apt-get dist-upgrade
# Install Java
sudo apt-get install default-jdk-headless
# Download & Install Hadoop
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-2.8.2/hadoop-2.8.2.tar.gz -P ~/Downloads
@steviee
steviee / 99-calibration.conf
Last active November 2, 2018 14:18
Touchpad calibration for TrekStor Wintron 10.1 duo (tested with Fedora Workstation 29, works oob otherwise)
# /usr/share/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier "calibration"
MatchProduct "Goodix Capacitive TouchScreen"
MatchIsTouchscreen "1"
Driver "evdev"
Option "MinX" "65409"
Option "MaxX" "-216"
Option "MinY" "474"
Option "MaxY" "65279"
### Keybase proof
I hereby claim:
* I am steviee on github.
* I am steviee77 (https://keybase.io/steviee77) on keybase.
* I have a public key ASDMYz6BTIRxGZX4z3TX6OoKI0I5omZ1b9955ha_E1DtXAo
To claim this, I am signing this object:
@steviee
steviee / pseudo.rake
Last active October 15, 2021 13:06
Pseudonomize user data in production DB (a copy, hopefully!)
# frozen_string_literal: true
require 'progress_bar'
require 'json'
require 'open-uri'
namespace :pseudo do
desc 'Pseudonymize user data'
task :perform => :environment do
count = User.count # get count of users currently in DB
bar = ProgressBar.new(count) # prepare some nice output