Skip to content

Instantly share code, notes, and snippets.

View JustSid's full-sized avatar

Sidney Just JustSid

View GitHub Profile
// Copyright (c) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@JustSid
JustSid / ibooks.py
Created April 8, 2016 15:24
Recover iBook filenames from an iOS backup
# I keep losing my iBooks library on OS X and have to recover it from my iPad
# However, the iPad doesn't preserver file names, so this simple scripts just puts them back togeter
import plistlib
import os
library = '...'
data = plistlib.readPlist(os.path.join(library, 'Books.plist'))
--- a/configure
+++ a/configure
@@ -2611,7 +2611,7 @@
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-am__api_version='1.13'
+am__api_version='1.14'
# Find a good install program. We prefer a C program (faster),
RN::PostProcessingPipeline *ppp_right = _right->AddPostProcessingPipeline("Rift right");
RN::Material *right_riftmat = new RN::Material(riftshader);
_right_riftstage = new RN::Camera(RN::Vector2(), RN::TextureParameter::Format::RGBA32F, RN::Camera::FlagInherit | RN::Camera::FlagUpdateStorageFrame, RN::RenderStorage::BufferFormatColor);
_right_riftstage->SetBlitMode(RN::Camera::BlitMode::Unstretched);
_right_riftstage->SetMaterial(right_riftmat);
ppp_right->AddStage(_right_riftstage, RN::RenderStage::Mode::ReUsePreviousStage);
_hWnd = CreateOffscreenWindow();
_hDC = GetDC(_hWnd);
PIXELFORMATDESCRIPTOR descriptor;
memset(&descriptor, 0, sizeof(PIXELFORMATDESCRIPTOR));
descriptor.nSize = sizeof(PIXELFORMATDESCRIPTOR);
descriptor.nVersion = 1;
descriptor.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
descriptor.iPixelType = PFD_TYPE_RGBA;
#include <stdio.h>
// Header
extern NSString *kARAudioRouteListenerHeadphonesPluggedIn;
extern NSString *kARAudioRouteListenerHeadphonesUnplugged;
@interface ARAudioRouteListener : NSObject
{
}