Skip to content

Instantly share code, notes, and snippets.

// gspa plugin like SplitText3.min.js CustomEase3.min.js
// !!!! ALWAYS SUPPORT THE DEVELOPERS, GSAP IS THE BEST TOOL OUT THERE. !!!!
// THIS IS FOR EDUCATION PURPOSE ONLY!
// Gsap script check for your window.location.href to identify if you're on a allowed site list.
// these list are in a array for charcter code
// [103, 114, 101, 101, 110, 115, 111, 99, 107, 46, 99, 111, 109] === 'greensock.com'
// you can add your domain aswell in this array.
// Plugins are minified use https://beautifier.io/ or any other site to get a readble code.
@colepeters
colepeters / index.html
Last active May 21, 2024 19:32
Example of a custom element to prefetch a link's `href`
<prefetched-link href="https://prefetch-this-href.example.org">
This link's href is prefetched if the user is on a fast network
</prefetched-link>
@mjbalcueva
mjbalcueva / calendar.tsx
Last active May 21, 2024 19:30
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@wzjoriv
wzjoriv / clustering.py
Last active May 21, 2024 19:29
Nearest Neighbor, K Nearest Neighbor and K Means (NN, KNN, KMeans) implemented only using PyTorch
import torch as th
"""
Author: Josue N Rivera (github.com/wzjoriv)
Date: 7/3/2021
Description: Snippet of various clustering implementations only using PyTorch
Full project repository: https://github.com/wzjoriv/Lign (A graph deep learning framework that works alongside PyTorch)
"""
def random_sample(tensor, k):
@csd-was-taken
csd-was-taken / YT UI Tweaks
Last active May 21, 2024 19:29
YouTube UI Tweaks
(these were all written by my friend @ranidspace, i can't write css to save my life lol. well the first one is mine, but i just used the element zapper)
Install uBlock origin, if you haven't already (you should regardless) https://ublockorigin.com/
Go to the dasboard (extension icon > settings cog), and select the My filters tab
Paste the following into the giant text box. If there's already text there, don't overwrite it, just add these lines below
www.youtube.com###dismissible > .ytd-rich-shelf-renderer.style-scope
!Removes shorts shelf
@AlexString
AlexString / change_var_names.md
Created November 20, 2021 21:08
Quickly change variable names in nvim

Change variable names with vim keys

This also works on VS Code vim plugin:

For small amounts of var copies.

* cw NEWNAME <esc> then repeat n. for other ocurrences

But better

@DevoKun
DevoKun / kafka.md
Created July 13, 2018 02:52
How to operate Kafka, mostly using Docker

Kafka Distributed Streaming Platform

Publish and Subscribe / Process / Store

Start Kafka

  • Kafka uses ZooKeeper as a distributed backend.

Start Zookeeper

@apzzd
apzzd / matrixTimesMatrix.c
Created May 21, 2024 19:26
✨ c code for multiplying two 2x2 matrices, with arguments ✨
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
float matrix1[4];
float matrix2[4];
int i, j;
@felippenardi
felippenardi / gist:ff56297c002c9a937b0df160fb1d4b1f
Created August 5, 2022 22:57
Mark as complete on Circle communities
<style>
/* Add "Completed" to like buttons */
.view-space-in-group--88671 .action-link,
.view-space-in-group--88671 .action-like.action-item {
background-color: var(--brand);
padding: 4px 8px;
border-radius: 11px;
opacity: 1;
}
@0xjac
0xjac / private_fork.md
Last active May 21, 2024 19:24
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git