Skip to content

Instantly share code, notes, and snippets.

@xgqfrms-GitHub
xgqfrms-GitHub / 前端知识汇总.md
Created December 21, 2016 07:43
前端知识汇总
@catid
catid / gist:533dd0c7d4f3ee8d34a6a905155b72ae
Last active April 20, 2024 06:49
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.
@greggyNapalm
greggyNapalm / gist:2413028
Created April 18, 2012 11:37
linux errno codes
# @see /usr/include/asm-generic/errno-base.h
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
@liuran001
liuran001 / config.yaml
Last active April 20, 2024 06:43
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.4.1-231211
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
# 虚空终端 (Clash Meta) Docs 地址: https://wiki.metacubex.one
@Ludomancer
Ludomancer / ColliderExtensions.cs
Last active April 20, 2024 06:42
Unity Extensions
using UnityEngine;
public static class ColliderExtensions {
public static bool IsVisibleFrom(this Collider collider, Camera camera)
{
Plane[] planes = GeometryUtility.CalculateFrustumPlanes(camera);
return GeometryUtility.TestPlanesAABB(planes, collider.bounds);
}

Guide to Add a Feature to a Web App

Intro

This guide is generic in that it does pertain to any particular web framework, e.g., Express.

When the time comes to implement a user story (feature) in a typical web application, following the steps below usually is a good approach to take in most cases...

@xneek
xneek / readme.md
Last active April 20, 2024 06:41
Несколько GIT учёток на одном компе

Несколько GIT учёток на одном компе

Предположим что у вас есть два рабочих каталога

  • c:\work
  • c:\hobby

в c:\work вы хотите коммитить с рабочего профиля гитхаб (ololoev@job.org), а в c:\hobby c личного (info@ololoev.ru)

для настройки необходимо перейти в домашнюю директрию текущего пользователя cd ~/

@tomazzaman
tomazzaman / generateSVG.js
Created January 16, 2016 19:33
Generate PNG from a React-powered SVG. Server-side.
/**
* Run this with `babel-node generateSVG.js`
*/
import fs from 'fs';
import path from 'path';
import { Readable } from 'stream';
import childProcess from 'child_process';
import phantomjs from 'phantomjs';
import im from 'imagemagick';
import tmp from 'tmp';
@knadh
knadh / zsh-elapsed-time.md
Last active April 20, 2024 06:35
Elapsed and execution time for commands in ZSH

Elapsed and execution time display for commands in ZSH

Append this to your ~/.zshrc file.

function preexec() {
 timer=$(($(date +%s%0N)/1000000))
@olih
olih / jq-cheetsheet.md
Last active April 20, 2024 06:34
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq