Skip to content

Instantly share code, notes, and snippets.


Bogdan Rădulescu bogdanr

View GitHub Profile
bogdanr / Flashlight-fade.ino
Last active Oct 13, 2017
Attiny13 flashlight fade in and out at button press
View Flashlight-fade.ino
#include <avr/interrupt.h>
#include <avr/sleep.h>
#define BUTTON 4
#define LED 1
int dir = 1;
int lum = 0;
boolean toggle = false;
int vals [] = {0, 1, 2, 3, 5, 9, 12, 18, 22, 32, 44, 58, 76, 120, 163, 255};
View EnergyMonitor.ino
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <BlynkSimpleEsp8266.h>
#include <SPI.h>
#include <bitBangedSPI.h>
#include <MAX7219_Dot_Matrix.h>
View WashingMachine.ino
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <DNSServer.h> //Local DNS Server used for red
bogdanr / purgearticle.php
Last active Jan 19, 2017
Purge web article from PHP
View purgearticle.php
header( 'Content-Type: text/plain' );
header( 'Cache-Control: max-age=0' );
$hostname = 'localhost';
$port = 80;
$URL = '/article.php';
$debug = true;
print "Updating the article in the database ...\n";
purgeURL( $hostname, $port, $URL, $debug );
function purgeURL( $hostname, $port, $purgeURL, $debug )
bogdanr / FuzzyClock.ino
Last active Jun 5, 2017
Precise LED clock that can only be imprecisely read
View FuzzyClock.ino
FuzzyClock is a precise LED clock that can only be imprecisely read.
Bogdan Radulescu <>
License: Apache License v2
#include <ESP8266WiFi.h> // This one comes with the boards manager import
#include <NTPtimeESP.h> // Get it from
#include <Adafruit_NeoPixel.h> // Get it from
#include <ArduinoJson.h> // Get it from
bogdanr / config
Created Apr 1, 2016
zen-kernel 4.5 config
View config
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.5.0 Kernel Configuration
bogdanr / ACPI
Last active Apr 3, 2016
Goodix info
nimblex:~# cat /sys/bus/acpi/devices/GDIX1001\:00/status
nimblex:~# cat /sys/bus/acpi/devices/GDIX1001\:00/uevent
nimblex:~# cat /sys/bus/acpi/devices/GDIX1001\:00/adr
nimblex:~# cat /sys/bus/acpi/devices/GDIX1001\:00/power_state
View teclast.html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<meta name="generator" content="lshw-B.02.17" />
<style type="text/css">
.first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; }
.second {padding-left: 1em; width: 100%; vertical-align: center; }
.id {font-family: monospace;}
bogdanr / gist:59297a484f0ec8211a35
Created Feb 5, 2016
Kill long running processes in RDS
View gist:59297a484f0ec8211a35
mysql -h __some_host__ -p __some_pass__ -r -s -e "select concat('CALL mysql.rds_kill(',id,');') from information_schema.processlist where command='Sleep' and time > 200;" > aaa.sql
bogdanr / squid.conf
Created May 25, 2015
Squid.conf SSL transparent proxy
View squid.conf
visible_hostname vm-gateway
# Recommended minimum configuration:
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src
acl localnet src
You can’t perform that action at this time.