Skip to content

Instantly share code, notes, and snippets.

View Zardoz89's full-sized avatar

Luis Panadero Guardeño Zardoz89

View GitHub Profile
@Zardoz89
Zardoz89 / dm.py
Last active March 1, 2024 11:05
Delta Modulation Coding and Decoding
#!/usr/bin/env python3
import array
import audioop
import wave
import sys
import time
try:
@Zardoz89
Zardoz89 / .nvimrc
Created October 20, 2014 17:39
My neovim configuration
set nocompatible " Use Vim defaults (much better!)
set runtimepath=~/.neovim/,$VIMRUNTIME
syntax on
filetype off " required!
if !has("unix")
" Vundle on Windows
set rtp+=~/vimfiles/bundle/Vundle.vim/
@Zardoz89
Zardoz89 / adm.py
Created August 10, 2013 13:15
Adaptative Delta Modulation coding example in Python 3
#!/usr/bin/env python3
import array
BYTES = 2 # N bytes arthimetic
MAX = 2 ** (BYTES * 8 - 1) - 1
MIN = - (2 ** (BYTES * 8 - 1)) + 1
CHUNK= 1024
@Zardoz89
Zardoz89 / 0 Lore.md
Last active July 23, 2020 19:44
Let's play Skyrim with mods

Suai Vasrume es una habitante nativa de la cuenca (The Reach). Su madre participó en el incidente de Markarth y fué una de las que se exilió para formar los renegados (Forsworn). Esto conllevó que Suai se criase toda su vida entre campamentos de renegados y que tuviese que aprenderse a valerse por si misma en el ambiente duro y la cultura primitiva y cruel de los Renegados.

Ya siendo adulta, empezó a cuestionar las ordenes tan extrañas que a veces recibían, como atacar ciertas minas para abandonar las a la primera de cambio. O que nadie se plantease rescatar a Mournoth, el líder de la rebelión, de las minas. Harta de tanta apatía y de seguir ciegamente ordenes, ha decidido irse por su cuenta a la aventura... y si de paso se lleva a unos cuantos nórdicos o imperiales que se dedican a explotar a los nativos, mejor que mejor.

@Zardoz89
Zardoz89 / SingletonTemplates.d
Last active April 26, 2020 14:00
Dlang templates to generate singlenton boilerplate
import std;
/**
* Implementes the TLS fast thread safe singleton
* Source: http://p0nce.github.io/d-idioms/#Leveraging-TLS-for-a-fast-thread-safe-singleton
*/
mixin template Singleton(T)
{
mixin("
private static bool instantiated_;
@Zardoz89
Zardoz89 / ascii.c
Last active March 3, 2020 11:43
Apuntes de como ascii.dll de Tizo pasa cadenas a DIV
int* empiezatexto = &mem[text_offset]; // Posición en memoria donde DIV guarda los textos generados por el interprete
int primertxt = (int)empiezatexto[0]; // primertxt obtiene el primer valor que hay la memoria de textos de DIV (un puntero?)
int* realpunteroascii;
int cantidaddetexto= X bytes
// A reservar memoria....
int* nuevopunteroascii = (int*) div_malloc(cantidaddetexto + 8); //Reservamos X bytes + 8 bytes extra
int mitxt = (int)nuevopunteroascii[0]; // extrae el primer valor que hay en la memoria que acabamos de reservar
@Zardoz89
Zardoz89 / div2.vim
Last active February 11, 2020 15:19
DIV2 syntax for VIM
" Vim syntax file
" Language: DIV2 language
" Maintainer: Luis Panadero Guardeño
" Latest Revision: 10-2-2020
if exists("b:current_syntax")
finish
endif
syn region divString matchgroup=divString start=+"+ end=+"+ oneline
Kubuntu 18.10 x64
CPU FX8370E
16GiB RAM
GPU RX580
@Zardoz89
Zardoz89 / DCPU-24.md
Last active February 12, 2018 09:22
Another CPU based on DCPU-16
layout title cat
default
DCPU-24 CPU
CPU

DCPU-24 Specification

Copyrights 1985 Mojang, Meisaka and zardoz of Trillek

@Zardoz89
Zardoz89 / vimrc
Last active July 18, 2017 16:45
My vimrc for gvim
set nocompatible " Use Vim defaults (much better!)
filetype off " required!
if !has("unix")
" Vundle on Windows
set rtp+=~/vimfiles/bundle/Vundle.vim/
let path='~/vimfiles/bundle'
call vundle#begin(path)
set encoding=utf-8 " Fix ugly characters on menu and welcome screen