Skip to content

Instantly share code, notes, and snippets.

View ReallyBadNews's full-sized avatar
👋
yo dewd

Kenny Elshoff ReallyBadNews

👋
yo dewd
View GitHub Profile
@smhutch
smhutch / restricted-as-prop.tsx
Created May 27, 2021 20:24
Restricting the `as` prop with Stitches
import type * as Polymorphic from "@radix-ui/react-polymorphic";
import type { ComponentProps } from "react";
import React, { forwardRef } from "react";
import { styled } from "../../theme";
const DEFAULT_TAG = "p";
const StyledText = styled(DEFAULT_TAG, {
// your styles
});
@aleclarson
aleclarson / rollup-typescript.md
Last active May 6, 2024 19:37
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@ErikFontanel
ErikFontanel / filter-youtube-domains.sh
Last active November 28, 2023 18:55
Pi-hole Youtube ad blocking
#!/bin/sh
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list.
# Run this script daily with a cron job (don't forget to chmod +x)
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136
# File to store the YT ad domains
FILE=/etc/pihole/youtube.hosts
# Fetch the list of domains, remove the ip's and save them
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/