This file contains 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 <stdint.h> | |
#include "HIDReportData.h" | |
const uint8_t standard_descriptor_primary[] = { | |
HID_RI_USAGE_PAGE(8, 0x01), | |
HID_RI_USAGE(8, 0x06), | |
HID_RI_COLLECTION(8, 0x01), | |
HID_RI_USAGE_PAGE(8, 0x08), |
This file contains 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 <string.h> | |
template <typename T> struct lift { | |
typedef T t; | |
}; | |
template <typename T> struct ptr { | |
typedef typename lift<T>::t* t; | |
}; | |
template <typename T> struct lift<ptr<T> > { |
This file contains 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 <curses.h> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <IOKit/hid/IOHIDManager.h> | |
#include <IOKit/hid/IOHIDKeys.h> | |
struct keyboard_handler { | |
uint8_t hid_report_buffer[1024]; | |
int index; |
This file contains 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 <iostream> | |
using namespace std; | |
template <typename... T> | |
struct pp {}; | |
template <typename T, typename TI, | |
typename U, typename UI> | |
struct matcher; |
This file contains 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 <iostream> | |
using namespace std; | |
template <typename... T> | |
struct pp {}; | |
template <typename T, typename TI, | |
typename U, typename UI, | |
typename F> |
This file contains 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
// Template Wrangling | |
// ================== | |
// convert a template into something that can be ::apply-ed | |
template <template <typename...> class T> | |
struct make_apply { | |
template <typename... Args> | |
using apply = T<Args...>; | |
}; |
This file contains 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
(require 'cl) | |
(whitespace-mode t) | |
(setq indent-tabs-mode t | |
tab-width 4) | |
(defun indent-to-test--run (start end) | |
(interactive "r") | |
(undo-boundary) | |
(flet ((undo-boundary () nil)) |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BuildMachineOSBuild</key> | |
<string>12C60</string> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>IOUSBHIDDriverDescriptorOverride</string> |
This file contains 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
#!/bin/bash | |
# pull apart a bzImage compressed with xz (or gzip), | |
# and put it back together in a format that pv-grub understands | |
# useful when your kernel is compressed but your pv-grub doesn't | |
# recognise it, for example rescue64 from system rescue cd. | |
# the result is *not* a bootable kernel outside of pv-grub | |
# worksforme on OS X, YMMV |
OlderNewer