Skip to content

Instantly share code, notes, and snippets.

View Music47ell's full-sized avatar
💀

Ahmet ALMAZ Music47ell

💀
View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active July 21, 2024 10:53
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@kettanaito
kettanaito / README.md
Last active July 21, 2024 23:17
Chromium on Vercel (serveless)

Chromium on Vercel (serverless)

This is an up-to-date guide on running Chromium in Vercel serverless functions in 2022. What you will read below is the result of two days of research, debugging, 100+ failed deployments, and a little bit of stress.

Getting started

Step 1: Install dependencies

Use chrome-aws-lambda that comes with Chromium pre-configured to run in serverless, and puppeteer-core due to the smaller size of Chromium distributive.

@tobimori
tobimori / _app.jsx
Created February 15, 2022 13:50
Ackee Analytics with Next.js
import { useEffect } from 'react'
import Router from 'next/router'
import * as ackeeTracker from 'ackee-tracker'
// global styles (css reset, fonts)
import 'assets/styles/global.css'
const PersonalApp = ({ Component, pageProps, router }) => {
useEffect(() => {
if (typeof window !== 'undefined') {
@samselikoff
samselikoff / tailwind.config.js
Created April 16, 2021 15:57
Firefox plugin for Tailwind CSS. Add styles that target Firefox browser only.
const plugin = require("tailwindcss/plugin");
module.exports = {
mode: "jit",
purge: {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx,vue}"],
},
theme: { extend: {} },
variants: {},
plugins: [
// Paste this into the console
var colors = [...document.querySelectorAll("*")].flatMap((el) => {
const style = getComputedStyle(el);
return [
style.getPropertyValue("color"),
style.getPropertyValue("background-color"),
];
});
@rtfpessoa
rtfpessoa / nextdns.js
Last active January 14, 2024 02:05
nextdns.io Block Youtube Ads
// ID of the config, e.g. A1234BCD.
const configID = "A1234BCD";
// API key, found at the bottom of your account page in https://my.nextdns.io/account
const APIKey = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
// Mark true or false. If true, failed links will be retried 3 times at progressively increasing intervals.
// If false, failed links will not be retried.
const retryFailedLinks = true;
// Time delay between requests in milliseconds.
// 800 seems to not give any errors but is rather slow while anything faster will give errors (in limited testing).
// If you want to go lower, it is recommended that "retryFailedLinks" is true
@heyitsarpit
heyitsarpit / .eslintignore
Created June 28, 2020 07:13
ESlint and Prettier for React apps (Bonus - Next.js and TypeScript)
node_modules
@janispritzkau
janispritzkau / analytics.js
Last active April 5, 2022 17:51
Minimal Google Analytics Script (677 bytes minified)
((document, location, navigator) => {
const domain = location.hostname.split(".")
const match = document.cookie.match(/(^|; ?)_ga=GA1\.\d\.(\d+\.\d+)(;|$)/)
// use existing client id or generate one
const cid = match ? match[2] : ~~(2147483648 * Math.random()) + "." + ~~(Date.now() / 1000)
// set cookie at highest possible domain level
for (let i = domain.length; i--;) {
const cookie = `_ga=GA1.${domain.length - i}.${cid}`
@kaicataldo
kaicataldo / gatsby-ssr.js
Last active April 13, 2021 19:13
Dark mode using Gatsby.js
import React from 'react';
export const onRenderBody = function({ setPreBodyComponents }) {
// Load dark mode script in head to prevent FOUC.
setPreBodyComponents([
<script
type="text/javascript"
key="theme-initializer"
src="/set-dark-mode.js"
/>,
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet