Skip to content

Instantly share code, notes, and snippets.

View soulbliss's full-sized avatar

Deepak Garasangi soulbliss

View GitHub Profile
import 'package:flutter/material.dart';
import 'dart:math';
const SCALE_FRACTION = 0.7;
const FULL_SCALE = 1.0;
const PAGER_HEIGHT = 200.0;
class ItCrowdPage extends StatefulWidget {
@override
_ItCrowdPageState createState() => _ItCrowdPageState();
@ppartarr
ppartarr / archdualboot.md
Last active April 28, 2025 15:26
Comprehensive guide to dual boot arch & windows

Dual booting Arch linux & Windows 10

There are already dozens of tutorials to setup an Arch and Windows dual boot - welcome to a dozen + 1. Like most others this is a step by step guide. Unlike most others the steps are ordered in a way that makes sense (starting with the download first - duh!) so you won't have to restart your computer a gazillion times.

I did this on a single SSD Dell XPS 15 with windows 10 preinstalled. It's obviously possible to follow this guide if you're installing Arch onto a different drive or if you're running older hardware. If you run into any problems please be sure to read through the Arch Installation Guide and the Arch Dual boot with Windows wiki.

To get started you will need:

  • a stable internet connection
  • a USB key with 1GB storage
  • a cup of coffee & and a can do attitude
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 8, 2025 21:06
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.

@amosbastian
amosbastian / route.ts
Last active August 6, 2024 20:08
Lemon Squeezy webhook using the new route handler in Next.js 13
import crypto from "crypto";
import { listAllSubscriptions } from "lemonsqueezy.ts";
import { NextRequest } from "next/server";
// Put this in your billing lib and just import the type instead
type LemonsqueezySubscription = Awaited<ReturnType<typeof listAllSubscriptions>>["data"][number];
const isError = (error: unknown): error is Error => {
return error instanceof Error;
};
@typeofweb
typeofweb / SuperLink.tsx
Last active June 21, 2024 15:06
Link with on-hover prefetching in Next.js
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "How to find an apprenticeship?",
"acceptedAnswer": {
"@type": "Answer",
"text": "<p>We provide an official service to search through available apprenticeships. To get started, create an account here, specify the desired region, and your preferences. You will be able to search through all officially registered open apprenticeships.</p>"
@eashish93
eashish93 / frontend.ts
Created August 3, 2024 11:51
Parallel upload on R2 using S3 sdk with multipart (for large files)
// Define the type for upload parts
type UploadParts = {
ETag: string;
PartNumber: number;
};
// Function to create multipart upload
async function createMultipartUpload(file: File): Promise<{ uploadId: string; key: string }> {
const fileKey = `${crypto.randomUUID()}-${file.name}`;
@mattiapomelli
mattiapomelli / badge.tsx
Last active March 9, 2025 19:48
MultiSelect w shadcn/ui
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {