Skip to content

Instantly share code, notes, and snippets.

View cdecompilador's full-sized avatar
😊
Studing

cdecompilador cdecompilador

😊
Studing
  • Zamora, Spain
View GitHub Profile
@cdecompilador
cdecompilador / keymap.c
Created February 14, 2024 16:26
keymap_corne
#include QMK_KEYBOARD_H
#include "version.h"
#include "keymap_spanish.h"
enum layers {
_QWERTY,
_LOWER,
_UPPER
};
import subprocess
import os
# Check that a command exists on the path
def check_install(cmd_name):
try:
subprocess.run([cmd_name])
except FileNotFoundError:
return False
return True
use std::convert::TryFrom;
trait IntoAbstract: TryInto<Abstract> {
fn into_abstract(self) -> Abstract {
self.try_into().ok().unwrap()
}
}
trait FromAbstract: TryFrom<Abstract> {
fn from_abstract(value: Abstract) -> Self {
use winit::{
event::*,
event_loop::{EventLoop, ControlFlow},
window::{Window, WindowBuilder},
dpi::PhysicalSize
};
/// The state if a wgpu rendering context for a certain window
struct State {
/// A surface is a target where to draw
@cdecompilador
cdecompilador / uwu.c
Last active April 11, 2022 15:08
uwu
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
int main() {
/* Primero imprimir el tamaño de cada tipo en host */
printf("unsigned char = %lu bits, int = %lu bits, long = %lu bits\n\n",
sizeof(unsigned char) * 8, sizeof(int) * 8, sizeof(long) * 8);
/* Crear en el heap un buffer de 32 bytes, es decir 4 longs (64 bits) */