This file contains hidden or 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
pub mod chrono_datetime_option_as_bson_datetime_option { | |
use bson::{Bson, DateTime}; | |
use chrono::Utc; | |
use serde::{Deserialize, Deserializer, Serialize, Serializer}; | |
use std::result::Result; | |
use serde::de::Error; | |
pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<chrono::DateTime<Utc>>, D::Error> | |
where | |
D: Deserializer<'de>, |
This file contains hidden or 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
// Draft for low-level macro-less API | |
// | |
// The goal of this draft is to explore a full-featured minimal API that does not rely on macro's. That should make it easier to port | |
// flecs to other languages, and allow for more straightforward integration with other frameworks / engines. This is not meant as a | |
// full replacement for an application-facing API, though should be able to coexist with one. | |
// | |
// Inspiration for naming conventions & declarative design comes from Sokol Gfx | |
// Create world as usual | |
ecs_world_t *world = ecs_init(); |
This file contains hidden or 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
STRUCT sg_buffer: | |
uint32_t id | |
TYPEDEF sg_buffer = struct sg_buffer | |
STRUCT sg_image: | |
uint32_t id | |
TYPEDEF sg_image = struct sg_image | |
This file contains hidden or 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
# this assumes your using oh-my-zsh for maximum zsh-ness | |
# info and defaults are here: | |
# https://github.com/robbyrussell/oh-my-zsh/blob/master/templates/zshrc.zsh-template | |
export LC_ALL="en_US.UTF-8" | |
export ZSH=/Users/bret/.oh-my-zsh | |
# custom prompt theme | |
ZSH_THEME="present" # mine is present, default is robbyrussell, also agnoster, fishy, ys, wild-cherry | |
COMPLETION_WAITING_DOTS="true" |
This file contains hidden or 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
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
This file contains hidden or 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
# /usr/share/BasiliskII/keycodes | |
# | |
# Basilisk II (C) 1997-2005 Christian Bauer | |
# | |
# This file is used to translate the (server-specific) scancodes to | |
# Mac keycodes depending on the window server being used. | |
# | |
# The format of this file is as follows: | |
# | |
# sdl <driver string> |
This file contains hidden or 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 <locale.h> | |
#include <X11/Xlib.h> | |
#include <X11/keysym.h> | |
int main(void){ | |
setlocale(LC_ALL, ""); | |
Display* dpy = XOpenDisplay(NULL); |
This file contains hidden or 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
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |
NewerOlder