This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include QMK_KEYBOARD_H | |
#include "version.h" | |
#include "keymap_spanish.h" | |
enum layers { | |
_QWERTY, | |
_LOWER, | |
_UPPER | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) */ |