Skip to content

Instantly share code, notes, and snippets.

@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 25, 2024 04:57
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@juliendkim
juliendkim / Install unbound dns cache on Mac.sh
Last active April 25, 2024 04:56
unbound dns cache server on Mac
$ brew install unbound
$ unbound-anchor -a /usr/local/etc/unbound/root.key
$ unbound-control-setup -d /usr/local/etc/unbound
$ unbound-checkconf /usr/local/etc/unbound/unbound.conf
$ sudo brew services start unbound
@efrecon
efrecon / run.tpl
Last active April 25, 2024 04:55
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active April 25, 2024 04:54
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.

@jigneshkhokhani
jigneshkhokhani / Dockerfile
Created April 11, 2023 14:35
angular-new-docker-app-creator : Create new angular app from docker it-self. It will create full angular directory without installing anything in local system.
FROM node:16-alpine
WORKDIR /front-app
COPY package*.json ./
RUN npm install
# Mentioned exposed port for documentation
EXPOSE 4200
@worldOneo
worldOneo / main.zig
Created October 15, 2023 11:41
Epoll based Event Loop chat application
const std = @import("std");
// primitive of the event loop.
// Ctx is typically a pointer to *This and data a pointer to the Users data.
// destroyData is called after the event has finished and must clean up the event to avoid leaks.
const Event = struct {
ctx: *anyopaque,
data: *anyopaque,
name: []const u8,
destroyData: *const fn (*anyopaque, *anyopaque) void,
@denguir
denguir / cuda_install.md
Last active April 25, 2024 04:51
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas Game</title>
<style>
canvas {
border: 1px solid black;
}
@shamil
shamil / mount_qcow2.md
Last active April 25, 2024 04:43
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@thesamesam
thesamesam / xz-backdoor.md
Last active April 25, 2024 04:43
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that