Skip to content

Instantly share code, notes, and snippets.

@erlepereira
erlepereira / DNSMasq_withMalwareBlocking.md
Last active January 22, 2025 23:49
Using DNSMasq as a caching nameserver & add in a malware etc blocking

Assuming a Properly configured DNSMasq

a quickstart for dnsmasq is given at the end if you have not set it up yet.

something like this will add a great regularly updated malware file for it to use. More security and privacy to you! Specifically, this uses https://github.com/StevenBlack/hosts Choose one of the Raw Hosts file from there to use.

To setup DNSMasq, follow the below ...

wget -O- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '$1 == "0.0.0.0" { print "address=/"$2"/0.0.0.0/"}' > /etc/dnsmasq.d/malware.conf`
@XiangGaoMSFT
XiangGaoMSFT / View Names.yaml
Last active August 15, 2018 14:46
Sample script to list all names - Shared with Script Lab
name: View Names
description: Sample script to list all names
author: xianggaomsft
host: EXCEL
api_set: {}
script:
content: |
$("#refresh").click(() => tryCatch(refresh));
async function refresh() {
@HKGx
HKGx / █▬█ █ ▀█▀.user.js
Last active April 23, 2020 17:13
Make every discount on steam a █▬█ █ ▀█▀
// ==UserScript==
// @name █▬█ █ ▀█▀
// @namespace https://github.com/HKGx
// @version 1.1
// @description Make every discount a █▬█ █ ▀█▀
// @author HKG
// @match https://store.steampowered.com/*
// @grant none
// @downloadURL https://gist.github.com/HKGx/7958a6d18d1128ae4dd5f5e365ab5094/raw/65d7756558257ff440a4843a90f825ef0970e789/█▬█ █ ▀█▀.user.js
// @updateURL https://gist.github.com/HKGx/7958a6d18d1128ae4dd5f5e365ab5094/raw/65d7756558257ff440a4843a90f825ef0970e789/█▬█ █ ▀█▀.user.js
@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active March 30, 2026 17:30
Vim script for Python Developers

Vim Script for Python Developers

This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m