Skip to content

Instantly share code, notes, and snippets.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active June 23, 2025 07:41
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@eldh
eldh / useMousePosition.ts
Created September 15, 2020 17:01
useMousePosition
import * as React from "react";
import { throttle } from "lodash";
/**
* Mouse position as a tuple of [x, y]
*/
type MousePosition = [number, number];
/**
* Hook to get the current mouse position
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active June 23, 2025 17:10
Conventional Commits Cheatsheet
@nuflowx
nuflowx / Remove black bars from video
Last active July 29, 2016 01:09
Get rid of the black bars of embeded youtube or similar video with CSS media queries
If you don't want the black bars on a video in your site these might do the trick for you:
```
@media all and (min-aspect-ratio: 16/9) {
.video {
width: 100vw;
height: calc(100vw * (9/16));
}
}
@media all and (max-aspect-ratio: 16/9) {
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"