Skip to content

Instantly share code, notes, and snippets.

@garasubo
garasubo / xim_example.c
Created January 25, 2020 05:14
Example code to use preedit callbacks in XIM
#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;
#Panda3D input polling interface idea
# When a keyboard/controller/mouse button is pressed/released/moved
# the values in base.inputs is updated.
# The keys are {device_name}-{button_name}
# The values for buttons are 1 or 0
forward = 'keyboard-w'
if base.inputs[forward]:
self.pc.set_y(self.pc, dt*move_speed)
@nondebug
nondebug / known_gamepads.txt
Last active April 12, 2024 03:39
A list of vendor and product IDs for known USB and Bluetooth gamepad devices
0000:006f JessTechColourRumblePad
0001:0329 Sl6566
0005:05ac Mocute
0010:0082 AkishopCustomsPs360Plus
0078:0006 MicrontekUsbJoystick
0079:0006 PcTwinShock
0079:0011 DragonRiseGamepad
0079:1800 MayflashWiiUProAdapter
0079:181a VenomLimitedArcadeJoystick
0079:181b VenomArcadeJoystick
// NOTE: We parse the constant table by hand since shadergen has to link against the
// Xenon (XBox 360) d3dx lib statically if Xbox builds are to be supported. That means
// we can't easily use non-Xenon D3DX from here.
// **** This part copy & pasted from D3DX headers (but it's a file format so it's consistent
// across versions)
//----------------------------------------------------------------------------
// D3DXSHADER_CONSTANTTABLE:
// -------------------------
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at