Skip to content

Instantly share code, notes, and snippets.

View cynthia's full-sized avatar
💩
<- mainly producing this

Sangwhan "fish" Moon cynthia

💩
<- mainly producing this
View GitHub Profile
@cynthia
cynthia / colorpdecrasher.c
Created February 27, 2014 17:25
This is a reverse engineered, minimized version of a crasher that I have experienced when trying to print, with Canon's SELPHY printer driver PDE (plug-in) installed.
// Minimized version of the ColorPDE.plugin crasher
// Sangwhan Moon <sangwhan@iki.fi>
//
// Based on ColorPDE.plugin - Copyright (c) Canon Electronics
// Compile with:
// gcc -g -F /Library/Printers/Canon/SELPHYCP/Frameworks \
// -framework SELPHYCPUIKit -framework CoreFoundation colorpdecrasher.c
#include <Carbon/Carbon.h>
// POSIX pthread compatibility shim for Windows.
#ifdef _WIN32
#include <Windows.h>
typedef HANDLE pthread_mutex_t;
static int pthread_mutex_init(pthread_mutex_t *mutex, void *unused)
{
unused = NULL;
*mutex = CreateMutex(NULL, FALSE, NULL);
return *mutex == NULL ? -1 : 0;
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>How Software Companies Die</title>
<meta name="author" content="Orson Scott Card">
</head>
<body>
@cynthia
cynthia / gist:3505322a43587b8e63eb
Created May 9, 2014 04:10
vile_osx10.9_xcode_5.1.patch
--- filters/filters.h 2014-05-09 13:08:24.000000000 +0900
+++ filters/filters.2.h 2014-05-09 13:08:30.000000000 +0900
@@ -210,7 +210,7 @@
extern FILE *yyget_out (void);
extern char *yyget_text (void);
extern int yyget_debug (void);
-extern int yyget_leng (void);
+extern yy_size_t yyget_leng (void);
extern int yyget_lineno (void);
extern int yylex_destroy (void);
#include <stdio.h>
#include <stdlib.h>
#define CHUJMAC 100
int i = 1;
void (*jebana[2])();
void dupa();
void chuj();
#if !defined(ANDROID_BITMAP_RESULT_SUCCESS)
#define ANDROID_BITMAP_RESULT_SUCCESS ANDROID_BITMAP_RESUT_SUCCESS
#endif
@cynthia
cynthia / vk_constants.txt
Last active August 29, 2015 14:03
VK Constants
// This is a list of all known virtual key constants use for CE Browsers.
// http://lists.w3.org/Archives/Public/public-web-and-tv/2011May/att-0039/vk-for-tv.html
VK_0
VK_1
VK_2
VK_3
VK_4
VK_5
VK_6
/**
* dualshock4.h - DualShock 4 USB HID Report Helper
*
* NOTE: Do not use this for production purposes, it's far from complete and is my
* initial attempt at working with USB HID. If it doesn't work, too bad.
* (Hoping to put this into content/browser/gamepad someday. If I ever finish.)
**
* Copyright (c) 2014 Sangwhan Moon
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
VKEY_BACK 0x08
VKEY_TAB 0x09
VKEY_BACKTAB 0x0A
VKEY_CLEAR 0x0C
VKEY_RETURN 0x0D
VKEY_SHIFT 0x10
VKEY_CONTROL 0x11
VKEY_MENU 0x12
VKEY_PAUSE 0x13
VKEY_CAPITAL 0x14
Keyevent.KEYCODE_DEL VKEY_BACK
Keyevent.KEYCODE_TAB VKEY_TAB
Keyevent.KEYCODE_CLEAR VKEY_CLEAR
Keyevent.KEYCODE_DPAD_CENTER VKEY_RETURN
Keyevent.KEYCODE_ENTER VKEY_RETURN
Keyevent.KEYCODE_SHIFT_LEFT VKEY_LSHIFT
Keyevent.KEYCODE_SHIFT_RIGHT VKEY_RSHIFT
Keyevent.KEYCODE_BACK VKEY_ESCAPE
Keyevent.KEYCODE_SPACE VKEY_SPACE
Keyevent.KEYCODE_MOVE_HOME VKEY_HOME