Skip to content

Instantly share code, notes, and snippets.

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 12, 2024 16:05
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@jjsquady
jjsquady / nextjs-deploy.md
Last active May 12, 2024 16:04
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@narmuni123
narmuni123 / guid_generator.dart
Created May 12, 2024 16:02
In this gist I am adding a code snippet where you can you can generate GUID. Code utilizes a random number generator to create a unique identifier following the standard GUID format. It ensures proper version and variant settings while maintaining the correct hyphenated structure.
import 'dart:math';
class GUIDGen {
static String generate() {
Random random = Random(DateTime.now().microsecond);
const String hexDigit = "0123456789abcdef";
final List<String> uuid = List.filled(36, '', growable: true);
@zmts
zmts / tokens.md
Last active May 12, 2024 15:59
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 12, 2024 15:56
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@jahirfiquitiva
jahirfiquitiva / settings.json
Created May 11, 2024 22:32
VS Code Settings
{
"breadcrumbs.enabled": false,
"editor.fontFamily": "'MonoLisa', 'Dank Mono', 'Operator Mono Lig', 'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "400",
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.stickyScroll.enabled": true,
"explorer.sortOrder": "type",
"workbench.editor.enablePreview": false,
"workbench.editor.highlightModifiedTabs": true,
@companje
companje / map.glsl
Created January 23, 2018 22:46
map() function for GLSL known from Processing & openFrameworks
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}
@wojteklu
wojteklu / clean_code.md
Last active May 12, 2024 15:53
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bsharper
bsharper / map_models.py
Created March 12, 2024 14:26
Map ollama models to normal filenames using symbolic links (Linux / macOS / Windows)
# Run without arguments to see what is found.
# Run with a path as an argument to create links to ollama models there.
# This will remove any files that follow the exact filename as the new link file, so use with caution!
import os
import sys
import json
import platform
@Varneon
Varneon / VRCSdkControlPanelWorldBuilder_ValidationStripping.md
Last active May 12, 2024 15:53
How to speed up VRCSDK - Worlds control panel by disabling redundant scene checks

How to speed up VRCSDK - Worlds control panel by disabling redundant scene checks

This guide shows you how to make VRCSDK faster by disabling scene checks considered redundant by many advanced world creators who just want the SDK to do its job, which is building and uploading the content they create to VRChat.

⛔ Follow this guide at your own risk! Please do not proceed if you do not consider yourself an advanced world creator and/or you are not familiar with VRChat's inner workings. ⛔

All changes in this guide will be made in the following file: Packages\com.vrchat.worlds\Editor\VRCSDK\SDK3\VRCSdkControlPanelWorldBuilder.cs, so go ahead and open it in your favourite code editor and let's get started!

⚠️ This guide applies to VRCSDK version 3.6.0

Be careful with applying these changes to different versions of the VRCSDK, double check what you're about to disable