Skip to content

Instantly share code, notes, and snippets.

@fellipec
fellipec / pihole-dhcp.md
Last active March 13, 2025 14:02
Pi-Hole DHCP configuration guide

Introduction

Pi-Hole's primary function is to be a DNS server with the ability to block domains, usually used for advertising, tracking or other unwanted sites. It also features a built-in DHCP Server.

Usually, your router will also have a built-in DHCP server, pre-configured from factory, and for most users this is perfectly fine. But in some cases you may want to run another DHCP server instead of relying on your router's one. This guide will help you understand how a DHCP server works and how to configure it without disturbing your network.

If you already know the networking basics, you can cut to the chase and read just the configuration part

Understanding the IP Addressing

@count23all
count23all / gist:49b83be49a587efab83af3dfa04f9d8c
Last active October 29, 2024 15:35
This userscript creates a right aligned overlay that accesses the Perplexity.AI Restful API for a user while htey are searching to provide an indication of the remaining limits they have for their searches for the refresh interval.
// ==UserScript==
// @name Perplexity.ai Limits Overlay (Dark Mode, Draggable)
// @namespace http://tampermonkey.net/
// @version 2.0
// @description Overlays various limit values on Perplexity.ai main and search pages, updates on submit
// @match https://www.perplexity.ai/
// @match https://www.perplexity.ai/search*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
@CKolkey
CKolkey / Gemfile.dev
Last active February 11, 2025 10:07
Using personal gems with Bundle without bothering your colleagues.
# NOTE: When updating gems, the ENV var below will need to be _unset_, so bundler updates the correct lock file.
# NOTE 2: The name 'Gemfile.dev' isn't important - it could be `dev_gems.rb` or anything else.
# SETUP:
# - Set the ENV var: BUNDLE_GEMFILE=Gemfile.dev in your app dir
# - Add Gemfile.dev and Gemfile.dev.lock to your .gitignore (global or local)
# - Copy the rest of this gist into Gemfile.dev (in your project root):
# Copy real lock file to ensure it gets priority
@mabenson00
mabenson00 / cheatsheet.rb
Last active March 6, 2025 07:42
Rails Postgres ActiveRecord JSON cheatsheet
# Basic key operators to query the JSON objects :
# #> : Get the JSON object at that path (if you need to do something fancy)
# -> : Get the JSON object at that path (if you don't)
# ->> : Get the JSON object at that path as text
# {obj, n} : Get the nth item in that object
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE
# Date
# date before today
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active March 14, 2025 23:09
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@onlurking
onlurking / programming-as-theory-building.md
Last active March 4, 2025 04:39
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@dieechtenilente
dieechtenilente / pihole.list
Last active July 29, 2024 14:18
Blocks many bad domains (pihole, host list, ...)
#
#
#
#
#
# Please use this blocklist: https://github.com/dieechtenilente/hostlist
#
#
#
#
@paulgrav
paulgrav / kibana_azuread.md
Last active September 29, 2024 10:05
Setting up Azure AD OpenID Connect with Kibana

Enabled Azure AD with Kibana

1. Configure Elasticsearch

As a pre-requisite we need to register a new app in Azure AD, note down some properties, and generate a Client Secret.

  1. Register an app in Azure Active Directory.
  2. Note its Application (client) ID
  3. Note the Directory (tenant) ID
  4. Generate a New Client Secret.
@bneff84
bneff84 / pre-request-script.js
Last active May 15, 2024 09:38
Postman WSSE Header Generation Pre-request Script (Tailored for Emarsys)
/*
* This script should be used as the pre-request script for any requests made to Emarsys. In theory, it should work for any API that implements WSSE authentication as well.
* To Use:
* 1: Set an environment variable for wsse-user and wsse-secret containing your WSSE user and secret respectively
* 2: On your Headers tab, add an X-WSSE header with a value of {{wsse-header}}
*
* That's it! When you make a request, the pre-request script will generate your Nonce, Timestamp, and Digest using your secret. The 1-time-use header will be stored in the environment as wsse-header and used for your request.
*/
//
// wsse.js - Generate WSSE authentication header in JavaScript