Skip to content

Instantly share code, notes, and snippets.

@zloedi
zloedi / roguelike_FOV.c
Last active May 13, 2024 21:51
Efficient roguelike grid FOV / shadowcasting / line of sight in a single C function inspired by https://docs.microsoft.com/en-us/archive/blogs/ericlippert/shadowcasting-in-c-part-one
// Copyright (c) 2021 Stoiko Todorov
// This work is licensed under the terms of the MIT license.
// For a copy, see https://opensource.org/licenses/MIT.
// What this function does:
// Rasterizes a single Field Of View octant on a grid, similar to the way
// field of view / line of sight / shadowcasting is implemented in some
// roguelikes.
// Uses rays to define visible volumes instead of tracing lines from origin
// to pixels.
import datetime
import pandas as pd
from ib_insync import *
pd.set_option('display.max_rows', None)
ib = IB()
ib.connect('127.0.0.1', 7496, clientId=15)
contract = Stock('SPY', 'SMART', 'USD')
@benwo
benwo / meta-tags.html
Last active May 13, 2024 21:44
Standard meta tags and meta image tags (and sizes).
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/Organization" lang="en">
<head>
<!-- Settings -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Search Engines -->
@SwooshyCueb
SwooshyCueb / almalinux
Last active May 13, 2024 21:42
Various os-release files
NAME="AlmaLinux"
VERSION="8.4 (Electric Cheetah)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA"
HOME_URL="https://almalinux.org/"
@afmiguez
afmiguez / wsl-kvm.sh
Last active May 13, 2024 21:41
Script to enable KVM in WSL2
#Fully based on https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/
if [ -z "$1" ]
then
echo "Must supply your Windows 10 username"
exit
fi
WIN_USERNAME=$1
#package updates and installations
@fnky
fnky / ANSI.md
Last active May 13, 2024 21:40
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@pedroeuzebioo
pedroeuzebioo / README.md
Last active May 13, 2024 21:35
Modelo de README (Perfil)

Olá! Tudo bem? Eu sou o Seu nome

Linha adicional de texto informativo sobre você. Seu Sobre deve ter cerca de 2 ou 3 linhas.

Linha adicional de citação de texto. (Opcional)

@devemdobro
devemdobro / README.md
Created January 31, 2022 20:49
README perfil devemdobro
@jfktrey
jfktrey / getch.py
Last active May 13, 2024 21:31
Cross-platform getch() for Python without any fuss
import platform
if platform.system() == "Windows":
import msvcrt
def getch():
return msvcrt.getch()
else:
import tty, termios, sys
def getch():
fd = sys.stdin.fileno()
@Samyany
Samyany / FFmpeg_french_quick_userguide.md
Last active May 13, 2024 21:30
Guide d'utilisation rapide en français de FFmpeg pour la manipulation vidéo

Guide rapide d'utilisation de FFmpeg

Ce document est un résumé rapide basé sur la documentation officielle de FFmpeg. Il a été créé pour faciliter la manipulation vidéo, bien que certaines informations puissent également être pertinentes pour l'audio.

Note : Ce document est une compilation de ce que j'ai compris et de mes propres expériences. Il est fait d'abord pour moi, est incomplet et peut contenir des erreurs.

Informations générales