Skip to content

Instantly share code, notes, and snippets.

View dmikoss's full-sized avatar
🎯
Focusing

Dmitry Kostenkov dmikoss

🎯
Focusing
View GitHub Profile
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman -Syu
sudo pacman -S networkmanager-vpnc
sudo pacman -S networkmanager-strongswan
sudo pacman -S networkmanager-l2tp
sudo steamos-readonly enable
@dmikoss
dmikoss / steamdeck-distrobox-docker.md
Last active March 16, 2024 13:34
Instructions to run docker with distrobox in Ubuntu container (Steam deck) - draft

Instructions to run docker with distrobox in Ubuntu container (Steam deck) - draft

  1. Install recent version of distrobox.
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local
  1. Add line to ~/.bashrc:
export PATH=$HOME/.local/bin:$PATH
@dmikoss
dmikoss / _GJK.md
Created October 30, 2020 07:58 — forked from vurtun/_GJK.md
3D Gilbert–Johnson–Keerthi (GJK) distance algorithm

Gilbert–Johnson–Keerthi (GJK) 3D distance algorithm

The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.

Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.

@dmikoss
dmikoss / col.md
Created October 30, 2020 06:51 — forked from vurtun/col.md

screen0 screen1

@dmikoss
dmikoss / tokens.md
Created June 26, 2019 22:00 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

Например после аутентификации юзер sasha получает право обращатся и получать от ресурса "super.com/vip" некие данные. Во время обращения юзера sasha к ресурсу vip система авторизации проверит имеет ли право юзер обращатся к этому ресурсу (проще говоря переходить по неким разрешенным ссылкам)

@dmikoss
dmikoss / foo.cpp
Created February 16, 2017 12:01 — forked from anonymous/foo.cpp
emscripten webgl 2 errors
#define GL_GLEXT_PROTOTYPES
#include <GLES/gl.h>
#include <GLES/glext.h>
#include <GLES3/gl3.h>
#include <stdio.h>
#include <emscripten.h>
#include <emscripten/html5.h>
#define GL_CALL( x ) \
{ \
@dmikoss
dmikoss / sdl-metal-example.m
Last active September 9, 2021 15:28 — forked from slime73/sdl-metal-example.m
SDL + Metal example
/**
* This software is in the public domain. Where that dedication is not recognized,
* you are granted a perpetual, irrevokable license to copy and modify this file
* as you see fit.
*
* Requires SDL 2.0.4.
* Devices that do not support Metal are not handled currently.
**/
#import <UIKit/UIKit.h>
/*
* Simple 2D NURBS renderer for OpenCV, reading DXF files
*
* The MIT License (MIT)
*
* Copyright (c) 2013 Roy Shilkrot
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
#pragma comment(lib, "opengl32.lib")
#include "glew.c"
template <typename T, typename U> static void patchUnsafe(T& t, U& u)
{
if (!t && u)
t = reinterpret_cast<T>(u);
}
#pragma once
#ifdef RBX_PLATFORM_IOS
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#ifdef __OBJC__
#include <OpenGLES/EAGL.h>
#endif
#define GLES