Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
HOST1='https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts'
HOST2='https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnsmasq/dnsmasq.blacklist.txt'
HOST3='https://gist.githubusercontent.com/mlabbe/37e68b0dc33c0869d5333c83cfcc0a42/raw/53b1f1474308e2cb86ffeba0b61edf95d09749d9/windowsupdate.conf'
HOST4='https://raw.githubusercontent.com/matteofumagalli1275/xiaomi-dns-blocklist/master/xiaomi_dns_block.lst'
HOST5='https://raw.githubusercontent.com/matteofumagalli1275/xiaomi-dns-blocklist/master/xiaomi_dns_allow.txt'
wget -O- $HOST1 | awk '$1 == "0.0.0.0" { print "address=/"$2"/0.0.0.0/"}' > /etc/dnsmasq.d/blacklist1.conf
wget -O- $HOST2 > /etc/dnsmasq.d/blacklist2.conf
wget -O- $HOST3 > /etc/dnsmasq.d/blockwindows.conf
This file has been truncated, but you can view the full file.
[
{
"course_title": "Gamification",
"link": "https://www.coursera.org/courses/gamification",
"description": "Gamification is the application of game elements and digital game design techniques to non-game problems, such as business and social impact challenges. This course will teach you the mechanisms of gamification, why it has such tremendous potential, and how to use it effectively. For additional information on the concepts described in the course, you can purchase Professor Werbach's book For the Win: How Game Thinking Can Revolutionize Your Business in print or ebook format in several languages.",
"image": "https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera.s3.amazonaws.com/topics/gamification/large-icon.png",
"price": "free",
"department": [
"computer-science/design-and-product",
@msquirogac
msquirogac / addBoardConfig.py
Created July 16, 2020 19:13
Tool to batch edit the avr_debugger for PlatformIO's boards manifests
#!/usr/bin/env python3
import sys
import json
import os.path
from collections import OrderedDict
clock_baud = {}
clock_baud['8000000'] = 115200
clock_baud['1000000'] = 9600
@msquirogac
msquirogac / .gdbinit
Last active June 10, 2020 08:01
Workarounds for wrong address interpreatation on AVR-GDB
define di
disas (void (*)())$arg0, (void (*)())$arg1
end
@msquirogac
msquirogac / main.cpp
Last active May 19, 2020 10:18
Platformio configuration for avr_debug integration
// Download lib from https://github.com/jdolinay/avr_debug
#include <avr8-stub.h>
#include <app_api.h>
void setup(void)
{
debug_init();
/* config here */
}
@msquirogac
msquirogac / main.c
Last active April 29, 2020 04:56
Platformio configuration for simavr integration
//Header for simavr macros
#include <simavr/avr/avr_mcu_section.h>
//Sets CPU model and frecuency
AVR_MCU(F_CPU, "atmega328");
//Sets which registers should be traced
const struct avr_mmcu_vcd_trace_t _mytrace[] _MMCU_ = {
{ AVR_MCU_VCD_SYMBOL("PORTB"), .what = (void*)&PORTB},
{ AVR_MCU_VCD_SYMBOL("PORTC"), .what = (void*)&PORTC},