Skip to content

Instantly share code, notes, and snippets.

@NekitoSP
NekitoSP / index.html
Last active July 26, 2019 04:42
SCSS extend example
<div class="about"> <!-- d-flex flex-row align-items-center -->
<div class="about__name"> <!-- lead text-center -->
Lorem Ipsum
</div>
<div class="about__content"> <!-- text-center -->
Dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.
</div>
</div>
@NekitoSP
NekitoSP / styles.scss
Created September 19, 2019 09:19
Bootstrap variables override
@import '~bootstrap/scss/functions'; // need by variables
@import '~bootstrap/scss/variables';
$card-border-width: 0;
$card-border-radius: 0;
$theme-colors: (
'blue': #15b3ee,
'orange': #eb5834
);
@NekitoSP
NekitoSP / grid-example.scss
Created October 7, 2019 05:55
Bootstrap functions usage
.my-items-list {
@include make-row();
&__item {
@include make-col-ready();
@include media-breakpoint-up(xs) {
@include make-col(12);
}
@include media-breakpoint-up(sm) {
@NekitoSP
NekitoSP / w4arguments.md
Created November 3, 2019 15:22 — forked from heatray/w4arguments.md
Worms 4 Mayhem Command line arguments

GAME SETTINGS

/CONFIG:%FILE%          загрузка настроек из файла
/W:%NUM%                ширина экрана
/H:%NUM%                высота экрана
/FS                     игра в полный экран
/WIN                    игра в окне
/REFRESH:%NUM%          частота или фпс в игре
/INVERTMOUSEFP          инверт мышки от первого лица [Mouse Y-axis inverted for first person]
@NekitoSP
NekitoSP / tree.css
Created November 15, 2019 06:06 — forked from dylancwood/tree.css
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;
@NekitoSP
NekitoSP / __why-and-how-to-use.md
Created November 20, 2019 01:52 — forked from passcod/__why-and-how-to-use.md
Bootstrap 4 mixins for spacing utilities without classes

Why?

This:

.action {
  @extend .ml-3;
}
@NekitoSP
NekitoSP / CantorPairUtility.cs
Created May 3, 2020 12:12 — forked from GibsS/CantorPairUtility.cs
Simple C# class to calculate Cantor's pairing function
using System;
public static class CantorPairUtility {
public static int CantorPair(int x, int y) {
return (((x + y) * (x + y + 1)) / 2) + y;
}
public static void ReverseCantorPair(int cantor, out int x, out int y) {
var t = (int) Math.Floor((-1 + Math.Sqrt(1 + 8 * cantor)) / 2);
@NekitoSP
NekitoSP / CMakeLists.txt
Created May 25, 2020 03:03 — forked from skypjack/CMakeLists.txt
N-Body with Magnum and EnTT
cmake_minimum_required(VERSION 3.1)
project(nbody)
# Add module path in case this is project root
if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../modules/" ${CMAKE_MODULE_PATH})
endif()
find_package(Magnum REQUIRED
@NekitoSP
NekitoSP / README.md
Created May 25, 2020 03:04 — forked from skypjack/README.md
Pong with EnTT and Magnum

Pong

With Magnum and EnTT. An adaptation of ecs_pong which is example material for Flecs, another ECS framework, developed as a learning exercise of both Magnum, EnTT and ECS in general. Runs at a solid 60 fps, can you believe it?

pong2

There are NOTE markings left in the code to highlight various differences and things I struggled with and would have liked to have done.