Skip to content

Instantly share code, notes, and snippets.

View alabhyajindal's full-sized avatar

Alabhya Jindal alabhyajindal

View GitHub Profile
@aclarknexient
aclarknexient / ublock.txt
Created October 13, 2023 13:43
ublock origin hackernews dark mode and narrower comment display
! The following 2 lines are what I use to display news.ycombinator.com
! Limit comments to 70 characters wide, making them easier to read
news.ycombinator.com##.comment:style(max-width: 70ch !important; overflow: hidden !important;)
! Invert the colours of the site, making a dark mode that I like
! `invert(95%)` does most of the work,
! but you can tweak the hue-rotate value to fine tune the colours
news.ycombinator.com##html:style(filter:invert(95%) hue-rotate(200deg); background: white)
@alabhyajindal
alabhyajindal / desktop.sh
Last active September 22, 2024 16:12
Create Desktop Entry from AppImage
#!/usr/bin/env bash
# Store icon and AppImage in variable
icon_path=$HOME/Downloads/<YOUR_LOGO_FILE_NAME>.png
exec_path=$HOME/Downloads/<YOUR_APPIMAGE_FILE_NAME>
# Copy both files
cp $icon_path ~/.local/share/applications/
cp $exec_path ~/.local/share/applications/
# Create a Desktop Entry file
@surprisetalk
surprisetalk / hn-gpt-free.js
Created March 23, 2023 13:00
Userscript to hide any HackerNews story with "GPT" in its title.
// ==UserScript==
// @name HackerNews GPT-Free Feed
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hides any Hacker News story with "GPT" in its title.
// @author Taylor Troesh
// @include https://news.ycombinator.com/*
// @grant none
// ==/UserScript==
@geordyjames
geordyjames / eslint_prettier_airbnb.md
Last active October 25, 2024 11:36
VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node
@RobertAKARobin
RobertAKARobin / python.md
Last active November 17, 2024 21:07
Python Is Not A Great Programming Language
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active November 17, 2024 14:13
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active October 12, 2024 17:17
Vanilla JavaScript Quick Reference / Cheatsheet
@skatenerd
skatenerd / bird_wadler.txt
Last active June 16, 2024 11:41
A gem from Bird and Wadler's Introduction to Functional Programming
"A good way to tackle such problems is to consider a simpler problem first.
There is, of course, no guarantee that solutions obtained for simpler problems
can be used directly in the problem which inspired them; they may only serve
to familiarise the solver with some of the features and difficulties involved.
Even so, the work is not wasted; familiarity with a problem is one of our most
important tools for solving it. And often we will be able to use the solution
directly or by adapting it."
!!!
@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active November 14, 2024 09:13
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@cuth
cuth / debug-scroll.md
Last active October 18, 2024 08:22
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right &gt; w || b.left &lt; 0) {