This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;
#!/bin/bash | |
## apt update && apt upgrade -y && apt autoremove -y | |
## やろうとしたらlockファイルがあって死んだのでlockファイルを消した | |
## rm -rf /var/lib/dpkg/lock | |
apt update && apt upgrade -y && apt autoremove -y | |
apt -y install locate git cmake build-essential checkinstall autoconf pkg-config libtool python-sphinx wget libcunit1-dev nettle-dev libyaml-dev libuv-dev libssl-dev zlib1g-dev | |
git clone https://github.com/tatsuhiro-t/wslay.git | |
git clone https://github.com/h2o/h2o.git | |
cd wslay/ | |
autoreconf -i |
// --- Library -------------------------------------------------------------------------- | |
#include <string.h> | |
#include <assert.h> | |
struct ui_box {int x,y,w,h;}; | |
typedef unsigned long long ui_id; | |
struct ui_node { | |
int parent; | |
int lst, end, nxt; | |
int siz[2]; |
A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d
using System.Runtime.InteropServices; | |
using System; | |
public static unsafe class Program | |
{ | |
[DllImport("kernel32.dll")] | |
private static extern void* VirtualAlloc(void* addr, int size, int type, int protect); | |
[DllImport("kernel32.dll")] | |
private static extern bool VirtualProtect(void* addr, int size, int new_protect, int* old_protect); | |
[DllImport("kernel32.dll")] |
// | |
struct TerminalCell | |
{ | |
// cell index into GlyphTexture, should be two 16-bit (x,y) values packed: "x | (y << 16)" | |
uint GlyphIndex; | |
// 0xAABBGGRR encoded colors, nonzero alpha for Foreground indicates to render colored-glyph | |
// which means use RGB values from GlyphTexture directly as output, not as ClearType blending weights | |
uint Foreground; |