Skip to content

Instantly share code, notes, and snippets.

@screeny05
screeny05 / el_to_dnsmasq.sh
Created May 10, 2019 21:54
Easylist to Dnsmasq
wget -q -nv https://easylist-downloads.adblockplus.org/easylist.txt -O list
egrep '^\|\|([a-Z\.]+)\^$' list | cut -d '^' -f1 | sed 's#||#address=/# ; s#$#/127.0.0.1#' | sort | uniq > list.dnsmasq
rm list
/*
Example code to get a MCP3*08 running with an ESP8266
for DiY energy monitoring solutions
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "MCP3208.h"
const char* ssid = "...";
const char* host = "...";
//ESP8266 (ESP01) with ESP01 BoB
//stream temperature data DS18B20 with 1wire on ESP8266 ESP01 and then turn load on/off. perfect for sous vide over the internet.
//shin-ajaran.blogspot.com
#include <ESP8266WiFi.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//Def
#define myPeriodic 15 //in sec | Thingspeak pub is 15sec
#define ONE_WIRE_BUS 2 // DS18B20 on GPIO2
@OnlyInAmerica
OnlyInAmerica / make-mega-adblock-hostsfile.sh
Last active September 30, 2023 23:29
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Modified Pi-hole script to generate a generic hosts file
# for use with dnsmasq's addn-hosts configuration
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh
# The Pi-hole now blocks over 120,000 ad domains
# Address to send ads to (the RPi)
piholeIP="192.168.1.1"
outlist='./final_blocklist.txt'