Skip to content

Instantly share code, notes, and snippets.

@esdras-schonevald
esdras-schonevald / enum_sample.php
Created May 16, 2022 13:50
PHP ^8.1 ENUM - HOW TO USE
<?php
declare(strict_types=1);
/**
* This is a sample
* How to use Enum to create a custom exception cases
* PHP 8.1^
*/
@rampfox
rampfox / Chromium-at-startup.md
Last active April 26, 2024 11:56
How to open Chromium in full screen at startup on the Raspberry Pi

First, it seems that ~/.config/lxsession/LXDE-pi/autostart does not exist by default.

  1. copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
@thepwrtank18
thepwrtank18 / vista.md
Last active April 26, 2024 11:56
Download VMware Tools for Windows Vista (and Windows 7 RTM)

As of 12/11/2020, VMware no longer signs Tools for Windows Vista with SHA-1, so you need Windows 7 SP1 or later to use the latest version.

However, you can use an older version of VMware Tools, which is here: https://media.githubusercontent.com/media/thepwrtank18/thepwrtank18/master/VMware%20Tools%20for%20Windows%207%20RTM%20and%20Vista.iso

Link is dead. Instead, here's a full on guide.

Step 0: Foreword

This is an unsupported operating system, with unsupported drivers. Use this at your own risk.

@leocomelli
leocomelli / git.md
Last active April 26, 2024 11:56
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@karpathy
karpathy / min-char-rnn.py
Last active April 26, 2024 11:55
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@JunkFood02
JunkFood02 / Motion.kt
Last active April 26, 2024 11:53
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing
@davidteren
davidteren / nerd_fonts.md
Last active April 26, 2024 11:53
Install Nerd Fonts via Homebrew [updated & fixed]

How @extend Works

@akhleung is working on hcatlin/libsass and was wondering how @extend is implemented in the Ruby implementation of Sass. Rather than just tell him, I thought I'd write up a public document about it so anyone who's porting Sass or is just curious about how it works can see.

Note that this explanation is simplified in numerous ways. It's intended to explain the most complex parts of a basic correct @extend transformation, but it leaves out numerous details that will be important if full Sass compatibility

@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 26, 2024 11:50
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@safariyan
safariyan / new-code-1.ipynb
Last active April 26, 2024 11:50
new-code-2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.