Skip to content

Instantly share code, notes, and snippets.

@geohot
geohot / llm.c
Last active May 1, 2024 13:41
Outputted llm.c from tinygrad
#include <stdlib.h>
#include <stdbool.h>
#include <tgmath.h>
#define max(x,y) ((x>y)?x:y)
#define half __fp16
void E_(int* data0) {
int val0 = data0[0];
data0[0] = (val0+1);
}
@ryumada
ryumada / fix-missing-grub-after-windows-install-or-update.md
Last active May 1, 2024 13:41
How to fix missing grub from Boot Menu after windows install or update

How to fix missing grub from Boot Menu after windows install or update[^1]

Boot your computer using USB Bootable Linux

Burn Linux Live CD ISO into your USB drive. then boot to it.

Then, install grub-efi-amd or grub-efi-ia32 based on your system specification.

sudo apt install grub-efi-amd
@lopspower
lopspower / README.md
Last active May 1, 2024 13:40
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@sbz
sbz / tty-size.c
Created April 14, 2017 02:05
get terminal size using ioctl get win size (TIOCGWINSZ) in C
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
int
main(void) {
struct winsize ws;
ioctl(STDIN_FILENO, TIOCGWINSZ, &ws);
printf ("lines %d\n", ws.ws_row);
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 1, 2024 13:35
Files for PlayStation BIOS Files NA-EU-JP
@iceener
iceener / index.ts
Created May 1, 2024 13:28
heyalice.app — Node.js server example
import express from 'express';
import { OpenAI } from 'openai';
const app = express();
const openai = new OpenAI({
apiKey: 'API_KEY'
});
app.use(express.json());
@edokeh
edokeh / index.js
Last active May 1, 2024 13:33
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active May 1, 2024 13:33
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@dlaehnemann
dlaehnemann / contribute_github_without_write_access.md
Last active May 1, 2024 13:32
contributing to github repo without write access: pull from origin repo, push to your own fork

Whenever I want to create pull requests to a repo that I don't have write access to, I:

  1. Fork the original repo to my account.
  2. Clone the original repo to my local machine.
  3. Add my fork as an additional remote and make it the push default.
  4. Make changes in a new branch locally.
  5. Push this branch to my fork.
  6. Create a pull request from there.