Skip to content

Instantly share code, notes, and snippets.

//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
@ayebrian
ayebrian / vmware.md
Last active April 20, 2024 07:45
VMware ESXi 8 / vCenter 8 / Workstation 17 8 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

ESXi 8

Key Tested
@savelee
savelee / index.html
Created December 6, 2019 17:20
A best practice for streaming audio from a browser microphone to Dialogflow or Google Cloud STT by using websockets.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>RecordRTC over Socket.io</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 20, 2024 07:34
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {
@AbhiiAB
AbhiiAB / 00_End Course Capstone Project.md
Created November 30, 2023 05:47 — forked from Shashank-Srivastava2108/00_End Course Capstone Project.md
End Course Capstone Project - Data Structure

End Course Capstone Project (Module Data Structure)

Capstone Project Submission Instructions

  1. Login/Sign Up to your GitHub account.
  2. Fork this Gist from the Top-Right corner.
  3. Edit your Gist and paste/write the code solutions inside the respective functions.
  4. Share your Gist link in the submission form as per the instructions given.

- Do not make any changes in the first 3 lines

End.Course.Capstone.Project.Submission.Video.mp4
with
dau as (
-- This part of the query can be pretty much anything.
-- The only requirement is that it have three columns:
-- dt, user_id, inc_amt
-- Where dt is a date and user_id is some unique identifier for a user.
-- Each dt-user_id pair should be unique in this table.
-- inc_amt represents the amount of value that this user created on dt.
-- The most common case is
-- inc_amt = incremental revenue from the user on dt
@catid
catid / gist:533dd0c7d4f3ee8d34a6a905155b72ae
Last active April 20, 2024 07:28
How to quantize 70B model so it will fit on 2x4090 GPUs
How to quantize 70B model so it will fit on 2x4090 GPUs:
I tried EXL2, AutoAWQ, and SqueezeLLM and they all failed for different reasons (issues opened).
HQQ worked:
I rented a 4x GPU 1TB RAM ($19/hr) instance on runpod with 1024GB container and 1024GB workspace disk space.
I think you only need 2x GPU with 80GB VRAM and 512GB+ system RAM so probably overpaid.
Note you need to fill in the form to get access to the 70B Meta weights.
@peterycky
peterycky / start-with-astro.md
Last active April 20, 2024 07:25
Astro presentation materials

Start with Astro

Create the project

For my purpose, I use bun, though npm, yarn and pnpm (for node) are also supported

  bun create astro@latest

You'll be pleasently surprised by a helpful control center

@skoqaq
skoqaq / build4123.sublime4.key
Last active April 20, 2024 07:23
Sublime Text 4 License Key
—– BEGIN LICENSE —–
Mifeng User
Single User License
EA7E-1184812
C0DAA9CD 6BE825B5 FF935692 1750523A
EDF59D3F A3BD6C96 F8D33866 3F1CCCEA
1C25BE4D 25B1C4CC 5110C20E 5246CC42
D232C83B C99CCC42 0E32890C B6CBF018
B1D4C178 2F9DDB16 ABAA74E5 95304BEF
9D0CCFA9 8AF8F8E2 1E0A955E 4771A576
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active April 20, 2024 07:23
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)