Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / LLM.md
Last active September 13, 2024 08:42
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

Some useful custom text objects for vim

Collection of my custom text objects I use quite often.

97975602 6e90ee00 1dda 11eb 9286 6894300457e3

Numbers

Put it into your .vimrc:

@RaschidJFR
RaschidJFR / webpack.config.js
Last active May 11, 2022 18:35
Transpile Angular project with Babel + Webpack
/**
* ## Angular custom webpack config for compatibility with IE11
* ------------------------------------------------------------
* 1. Add this file to your project root. Add the modules list that needs transpiling (see below code).
* 2. Install dev dependencies:
*
* `$ npm i -D @angular-builders/custom-webpack:browser babel-loader @babel/core @babel/preset-env browserlist`
*
* 3. Add this to your `angular.json`:
*
@calebergh
calebergh / signature.directive.ts
Created February 23, 2020 18:59
Electronic Signature Pad for Angular 8
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
@Directive({
// tslint:disable-next-line:directive-selector
selector: '[signature]',
})
export class SignatureDirective implements OnInit, OnChanges {
@Output() imgSrc = new EventEmitter<string>();
@Input('clear') clearMe;
@Input('options') options;
@theofidry
theofidry / readme.md
Last active September 11, 2023 05:59
Safe Bash

Safe bash script configuration instructions

Source: [Vaneyckt: Safer bash scripts with 'set -euxo pipefail'][vaneyckt safer bash scripts]

Shortcut: set -Eeuox pipefail

Set -e

Makes the script exit immediately when a command fails.

@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active September 8, 2024 01:13
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@nicolasdao
nicolasdao / open_source_licenses.md
Last active September 21, 2024 17:31
What you need to know to choose an open source license.
@manasthakur
manasthakur / submodules.md
Last active July 24, 2024 01:20
Using git submodules to version-control Vim plugins

Using git-submodules to version-control Vim plugins

If you work across many computers (and even otherwise!), it's a good idea to keep a copy of your setup on the cloud, preferably in a git repository, and clone it on another machine when you need. Thus, you should keep the .vim directory along with your .vimrc version-controlled.

But when you have plugins installed inside .vim/bundle (if you use pathogen), or inside .vim/pack (if you use Vim 8's packages), keeping a copy where you want to be able to update the plugins (individual git repositories), as well as your vim-configuration as a whole, requires you to use git submodules.

Creating the repository

Initialize a git repository inside your .vim directory, add everything (including the vimrc), commit and push to a GitHub/BitBucket/GitLab repository:

cd ~/.vim
@Wunkolo
Wunkolo / compact.cpp
Last active May 5, 2024 20:21
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,