Skip to content

Instantly share code, notes, and snippets.

View zhangfuwen's full-sized avatar

Dean zhangfuwen

View GitHub Profile
@zhangfuwen
zhangfuwen / xim_example.c
Created October 9, 2023 13:54 — forked from Determinant/xim_example.c
A minimal example for X Input Method.
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include <assert.h>
Display *dpy;
Window win;
@zhangfuwen
zhangfuwen / log-system.cpp
Created July 7, 2021 09:39 — forked from jiahaowu/log-system.cpp
example of using boost log, which includes stdout, file output, log rotation, message format
#include <boost/log/core.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks/text_file_backend.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/utility/setup/console.hpp>
#include <boost/log/utility/setup/file.hpp>
@zhangfuwen
zhangfuwen / playground-gles2-triangle-color.swift
Created July 8, 2017 07:28
swift opengl 颜色渐变三角形
import UIKit
import PlaygroundSupport
import UIKit
import GLKit
import OpenGLES
import XCPlayground
import PlaygroundSupport
import OpenGLES
@zhangfuwen
zhangfuwen / ui-savefile-dialog.go
Created November 1, 2016 13:38
create a save file dialog via libui
package main
import (
"fmt"
"github.com/andlabs/ui"
)
func main() {
ui.Main(func() {