Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pezcode
pezcode / projection.hpp
Last active April 23, 2024 14:25
Reversed Z + infinite far plane projection matrices with GLM
// these matrices are for left-handed coordinate systems, with depth mapped to [1;0]
// the derivation for other matrices is analogous
// to get a perspective matrix with reversed z, simply swap the near and far plane
glm::mat4 perspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear, float zFar) {
return glm::perspectiveFovLH_ZO(fov, width, height, zFar, zNear);
};
// now let zFar go towards infinity
glm::mat4 infinitePerspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear) {
@jbwhit
jbwhit / example-ruff-formatting.ipynb
Last active April 23, 2024 14:25
Steps to use `ruff` in JupyterLab with the `jupyterlab_code_formatter` plugin.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mid
mid / gist:37e0ddfa2d5fb13b68a763587a0a9521
Created June 22, 2017 16:16 — forked from farico/gist:3938084
Linksniavimas LT vardu
<?php
/**
* Lietuviškų vardų linksniai.
*
* @author Maug Lee <mauglee@gmail.com>
* @copyright Copyleft (ↄ) 2011, Maug Lee
* @version 0.3
* @package Vardai
*/
@jshaw
jshaw / byobuCommands
Last active April 23, 2024 14:23
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
" Function to quickly open/hide terminal window inside vim
" Terminal operation when
" 1. terminal is open in split window, it closes the window (terminal still
" running)
" 2. terminal open in buffer, it moves window into split window
" 3. no termial instance running then it opens new terminal instance in split
" window
function Term() abort
let bufNum = bufnr('term://')
let termNum = bufwinnr('term://')
@vitorbritto
vitorbritto / rm_mysql.md
Last active April 23, 2024 14:21
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@qoomon
qoomon / conventional_commit_messages.md
Last active April 23, 2024 14:18
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@Glavak
Glavak / mechanics.txt
Created December 7, 2020 13:52
Список игровых механик из видео https://youtu.be/hq5fofOLI6w
Здоровье в качестве валюты как в некоторых комнатах Isaac'а или пули за здоровье в Bloodborne
Туман войны, он есть во многих стратегиях
Отсутствие меню, или меню вписанное в игровой мир, например в Antichamber
Красные бочки - наверное одна из самых шаблонных механик - но зато это делает её понятной всем игрокам
Такая широкая идея как редактирование мира, как в терарии и майнкрафте, или в astroneer, в котором она выглядит красивее засчёт отсутствия блоков
Гибкое создание кастомных заклинаний или оружия, как было в тех же Worms
Сохранение в кровати или в доме игрового персонажа
Bullet hell, и не обязательно как жанр, можно создать такого босса или уровень во многих 2D играх со стрельбой
Сложные взаимоотношения между нпс, когда мутанты сражаются с рейдерами, или система нпс в Streets Of Rouge
Изменение цвета уровня как в shift
@ChenSheng233
ChenSheng233 / XSSF 单元格有效性-下拉框
Last active April 23, 2024 14:14
POL Excel 单元格有效性
InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream("excel/合同模板.xlsx");
Workbook workbook = new XSSFWorkbook(input);
//获取页面
Sheet sheet = workbook.getSheet("sheet1");
// 获取第一行最后一列
Row row = sheet.getRow(0);
short lastNum = row.getLastCellNum();
// 单元格居中对齐
@maxspero
maxspero / wordle_variants.md
Last active April 23, 2024 14:12
Comprehensive list of Wordle variants

Original

  • Wordle - Guess a five-letter word in six guesses. Each guess must be real words.

Clones

Multiplayer