Skip to content

Instantly share code, notes, and snippets.

View Staubgeborener's full-sized avatar
:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";

Staubgeborener

:shipit:
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo ":)";
View GitHub Profile
@Staubgeborener
Staubgeborener / python_wikipedia-twitter-bot.py
Last active April 30, 2020 06:48
A small bot, which parse some random content from wikipedia and post it on twitter
#(Update from Python2 -> Python3)
from twython import Twython
from urllib.request import urlopen
from importlib import reload
import urllib
import sys
#reload(sys)
#sys.setdefaultencoding('utf8')
@Staubgeborener
Staubgeborener / GetRaspiStats.py
Last active October 30, 2018 04:44 — forked from funvill/gist:5252169
Get the system stats on the raspberry pi or any linux system in python
#This Script needs Python3. Original script from @funvill,
#edit (urllib and http/request support, also added gpu temperature) by @staubgeborener
#This edit allows to post raspberry pi stats on any php supported website. You could use this together with cron for example.
import os
import urllib.request, urllib.parse
# Return CPU temperature as a character string
def getCPUtemperature():
res = os.popen('vcgencmd measure_temp').readline()
#include "freertos/FreeRTOS.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
uint16_t offset = 0;
@Staubgeborener
Staubgeborener / ESP32_GetRSSI.c
Last active July 17, 2021 22:29
Grep and parse the RSSI of received packets
/* ESP32 Get RSSI of packets- Promiscuous Mode
(C) 2017, Staubgeborener
https://github.com/Staubgeborener/ */
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "lwip/err.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
@Staubgeborener
Staubgeborener / HexToBinary.cpp
Last active August 3, 2017 09:25
Convert hexadecimal into binary
/* HexToBinary Headerfile
Convert Hexdata into binary
(C) 2017, Staubgeborener
https://github.com/Staubgeborener/ */
#include "HexToBinary.h"
#include <stdio.h>
#include <string.h>
HexToBinary::HexToBinary() {