Skip to content

Instantly share code, notes, and snippets.

@fb-sean
fb-sean / alternatives-to-mee6.md
Last active May 3, 2024 17:51
A short and good list to alternatives to mee6.

Mee6 Alternatives

Iris XP (Leveling)

Description: Easy to use, fully customisable XP bot.
Link: Invite Iris XP
Credit: @173815235243802624

TempVoice (Temp voice channels)

@nimone
nimone / Sidebar.jsx
Created June 29, 2023 09:33
Retractable Sidebar Component purely in ReactJS and TailwindCSS
import { MoreVertical, ChevronLast, ChevronFirst } from "lucide-react"
import { useContext, createContext, useState } from "react"
const SidebarContext = createContext()
export default function Sidebar({ children }) {
const [expanded, setExpanded] = useState(true)
return (
<aside className="h-screen">
@Artistan
Artistan / EloquentUser.php
Last active May 3, 2024 17:47
Paginator with relations... load the relations on the model
<?php
namespace App;
use Illuminate\Pagination\LengthAwarePaginator;
use App\Http\Controllers\Controller;
class EloquentUser extends Controller {
// these will work for eloquent, but not with a scout->search since scout is not building a query.
public function paginate($query)
@promto-c
promto-c / General-Web-App-GitHub-Pages-Deployment-Guide.md
Created December 28, 2023 16:59
Comprehensive Guides for Deploying React, Node.js, and General Web Applications on GitHub Pages

Deploying a General Web App (HTML, CSS, JS) on GitHub Pages

A step-by-step guide to deploying web applications (using HTML, CSS, JavaScript) on GitHub Pages, categorized into three main sections for ease of understanding and implementation.

Preparing Your Web Application

  1. Create Your Web Application

    • Prepare your web application with HTML, CSS, and JavaScript files. Ensure the entry point of your app is an index.html file.
  2. Organize Your Application

@Cauen
Cauen / code.ts
Last active May 3, 2024 17:39
Prisma Accent Case + Complex Query
// Raw Query
const getUnnacentPersonIdsByNameOrNickname = async (text?: string | null) => {
if (!text) return []
// Search accent case with View
const unnacentLower = (str: string) =>
str
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.toLocaleLowerCase()
const nameWhere = `unaccent(lower(name)) ilike '%${unnacentLower(
#pragma once
// Mira-VNext
#if MIRA_PLATFORM==MIRA_PLATFORM_ORBIS_BSD_1100
#include <mira/Kernel/Boot/Config.hpp>
/*
These are the required functions in order for the Oni Framework to operate properly
These are all offsets into the base of the kernel. They expect all standard FreeBSD 9 prototypes
The reason we do not hardcode offsets here, is due to the different platforms that are supported, and
@BenjaminArmstrong
BenjaminArmstrong / SaveVMBitmap.ps1
Last active May 3, 2024 17:33
Sample PowerShell script that shows you how to create a .BMP file of the display of a Hyper-V virtual machine.
$VMName = "VM 1"
$BMPName = "C:\Users\benja\Desktop\test.bmp"
Add-Type -AssemblyName "System.Drawing"
$VMCS = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_ComputerSystem -Filter "ElementName='$($VMName)'"
# Get the resolution of the screen at the moment
$video = $VMCS.GetRelated("Msvm_VideoHead")
$xResolution = $video.CurrentHorizontalResolution[0]
@rob-hills
rob-hills / ubuntu-22.04-mbp-a1707.md
Last active May 3, 2024 17:33
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.

import { zodResolver } from "@hookform/resolvers/zod";
import * as z from "zod";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; //shadcn ui folder
const MAX_FILE_SIZE = 1024 * 1024 * 5;
const ACCEPTED_IMAGE_MIME_TYPES = [
"image/jpeg",
"image/jpg",
"image/png",
"image/webp",
];