Skip to content

Instantly share code, notes, and snippets.

@ardakazanci
ardakazanci / CircularMainMenuGroup.kt
Created January 13, 2024 05:54
Circular Menu Group for jetpack compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
CircularMenuGroupTheme {
MainMenuCanvas()
}
}
}
@mansarip
mansarip / info.md
Last active April 16, 2024 05:03
How to use PDFKit with Hono + Bun

How to use PDFKit with Hono + Bun

Full example

import { Hono } from "hono";
import PDFDocument from "pdfkit";

const app = new Hono();
<!DOCTYPE html>
<html>
<head>
<title>2D Platformer</title>
<style>
canvas {
border: 1px solid black;
}
</style>
</head>
@Artefact2
Artefact2 / README.md
Last active April 16, 2024 05:01
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 16, 2024 05:01
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@dejanstojanovic
dejanstojanovic / OpenSSL.md
Last active April 16, 2024 04:57
Common OpenSSL commands

Common openssl commands

Create CSR

openssl req -nodes -newkey rsa:2048 -nodes -keyout privateKey.key -out CertRequest.csr -subj "/CN=mydomain.com"

Generate self-sign certificate

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt
@gbrow004
gbrow004 / ubuntu-MBP-16.md
Last active April 16, 2024 04:57
Ubuntu on Apple Macbook Pro 16-inch (2019)

Update!

This gist is out of date and I can no longer help much, as I got rid of my Mac.

Please visit T2 Linux website for more and better information:

https://t2linux.org/

Acknowledgements

This gist is just a compilation of the hard work that others have put in. I'm not a software developer, so if there are any mistakes or better ways of doing things, I'd appreciate any suggestions. Here's a list of the real heroes who made this possible:

@vancluever
vancluever / gnome-tracker-disable.md
Last active April 16, 2024 04:57
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@gdamjan
gdamjan / README.md
Last active April 16, 2024 04:57
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@Mytherin
Mytherin / llvmtest.c
Created July 5, 2016 11:50
JIT Compile a For loop using the LLVM 3.9 C API
/**
* LLVM equivalent of:
*
* void loop(double *result, double *a, double *b, size_t length) {
* for(size_t i = 0; i < length; i++) {
* result[i] = a[i] * b[i];
* }
* }
*/