Skip to content

Instantly share code, notes, and snippets.

View zeshhaan's full-sized avatar
🎯
Focusing

Mohammed Zeeshan zeshhaan

🎯
Focusing
View GitHub Profile
@csswizardry
csswizardry / nesting.css
Created February 25, 2021 16:49
DOM Depth Visualiser
/**
* Tier 1 – Dotted
*/
* { outline: 2px dotted purple; }
* * { outline: 2px dotted blue; }
* * * { outline: 2px dotted green; }
* * * * { outline: 2px dotted yellow; }
* * * * * { outline: 2px dotted orange; }
* * * * * * { outline: 2px dotted red; }
@TheThirdRace
TheThirdRace / Image.tsx
Last active February 6, 2024 15:20
Image component: merge Chakra-ui `2.8.0` with NextJs `13.4.13` and remove most pain points
/**
* # `<Image>`
*
* This component is a merge between `next/image` and `Chakra-ui`.
* - last updated on 2023-08-08 with `next/image` 13.4.13 and `chakra-ui/react` 2.8.0
* - https://github.com/vercel/next.js/blob/v13.4.13/packages/next/src/client/image-component.tsx
* - https://github.com/vercel/next.js/blob/canary/packages/next/src/client/image-component.tsx
* - https://github.com/vercel/next.js/commits/canary/packages/next/src/client/image-component.tsx
* - https://github.com/vercel/next.js/compare/v13.4.4...canary
*
@manduks
manduks / lowestCommonAncestor.js
Last active July 1, 2023 12:05
Lowest Common Ancestor in a Binary Tree in Javascript
/*
Taking this tree as an example the output for
lowestCommonAncestor('k', 'j') => e
a
/ \
b c
/ \
d e
/ \
f g
@oliverjumpertz
oliverjumpertz / dialog.html
Created December 24, 2020 21:04
HTML native dialog
<dialog open>
<form method="dialog">
<p>Do you want to confirm your action?</p>
<div class="right">
<input class="btn" type="submit" value="Ok" />
<input class ="btn" type="submit" value="Cancel" />
</div>
</form>
</dialog>
@tunnela
tunnela / README.md
Last active February 3, 2025 12:36
Webflow + Firebase user authentication

Webflow + Firebase user authentication

You can find a demo at https://webflow-authentication.webflow.io/sign-up.

1. Set up Firebase authentication

Log in to Firebase console. Create a new app and from the left side menu, under Develop, navigate to Authentication. Enable Email/Password sign-in provider. After this, create a Web application under the current Firebase project and copy the given firebaseConfig object.

2. Create Webflow pages

@danro
danro / webflow-tabs-auto-scroll.html
Created October 23, 2020 03:56
Auto-scroll the browser to a clicked tabs element position
<script>
// When a tab is clicked, animate scroll to the top of the tabs element
$('.w-tab-link').on('click', function (event) {
var clickedLink = $(event.currentTarget);
var tabsElement = clickedLink.closest('.w-tabs');
var rootElement = $('html, body');
var newTop = tabsElement.offset().top;
if (rootElement.scrollTop() !== newTop) {
rootElement.stop().animate({scrollTop: newTop}, 500, 'swing');
}
type Timed<'T> =
{ Timestamp: DateTimeOffset
Value: 'T }
type Clock = unit -> DateTimeOffset
let Timed (c: Clock) v =
{ Timestamp = c ()
Value = v }
@swlaschin
swlaschin / fsharpjobs.md
Last active January 27, 2025 07:24
My suggestions on how to look for F# jobs

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@cspags
cspags / reset-webflow-form.js
Last active September 25, 2023 16:17
Webflow - Reset a form to it's original state after it is submitted, instead of showing the success message
$(function() {
/*** START SCRIPT CONFIG ***/
// Replace with value for your form. ie. "#your-form-id" or ".your-form-class"
var FORM_SELECTOR = ".recipe-form";
// Do you want to hide the success message after the form is submitted?
var HIDE_SUCCESS_MESSAGE = false;
// Do you want the success message to show above the form?
@chris-sev
chris-sev / setup.sh
Last active February 13, 2025 23:49
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock