Skip to content

Instantly share code, notes, and snippets.

// This part tells the code where to render the stuff
@Html.RenderResources("css")
@Atulin
Atulin / http-version-awareness.md
Last active December 19, 2020 12:15
HTML standard RFC ideas

HTTP Version Awareness

Current state and proposed change

Currently, resources can be loaded conditionally depending on screen width or device's light/dark mode preference, for example

<link media="prefers-color-scheme: dark" rel="stylesheet" href="/css/dark.css">
<link media="prefers-color-scheme: light"rel="stylesheet" href="/css/light.css">
using System;
using System.Collections.Generic;
public static class VonNeumannExtensions
{
public static IEnumerator<int> GetEnumerator(this int number)
{
for (var i = 0; i < number; i++)
{
yield return i;
@Atulin
Atulin / README.md
Last active November 4, 2020 03:43

VPS Offer Comparison

In here, you'll see the comparison of VPS offers by various providers. Some values are missing, that's because I could not find what they were.

@Atulin
Atulin / README.md
Last active February 27, 2021 16:48
PHP 7.4.0 and 8.0.1 string concatenation vs interpolation

Concatenation vs interpolation

Description

This simple benchmark concatenates and interpolates 1000 strings 100 times and reports the results with microtime().

Interpretation

7.4

[
{
"Quote": "Either write something worth reading or do something worth writing.",
"Author": "Benjamin Franklin"
},
{
"Quote": "The art of writing is the art of discovering what you believe.",
"Author": "Gustave Flaubert"
},
{
@Atulin
Atulin / AnomalyData.csv
Last active May 2, 2020 04:36
2214 data points from Warframe anomaly parser
# time result
1 1576733228191
2 1576739593283 Gian Point
3 1576741455348
4 1576749623335 H-2 Cloud
5 1576751365227
6 1576761514188 Nsu Grid
7 1576763376196
8 1576771424481 H-2 Cloud
9 1576773253876
@import url('https://fonts.googleapis.com/css?family=Mukta');
body{
font-family: 'Mukta', sans-serif;
height:100vh;
min-height:550px;
background-image: url(http://www.planwallpaper.com/static/images/Free-Wallpaper-Nature-Scenes.jpg);
background-repeat: no-repeat;
background-size:cover;
background-position:center;
public static class CTConfig
{
public static class User
{
public const int MinNameLength = 5;
public const int MaxNameLength = 20;
public const int MinPassLength = 10;
public const int MaxPassLength = 100;
}