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
http://cgit.freedesktop.org/xorg/app/edid-decode/plain/edid-decode.c | |
compile with: | |
gcc edid-decode.c -o edid-decode | |
get EDID from IORegistryExplorer (mine, an old 24" Apple Cinema Display, is attached). | |
Convert to binary with this command: | |
ruby -e 'File.open("edid", "wb").write(File.read("edid.txt").split.map { |s| ("0x"+s).to_i(16) }.inject("", "<<"))' |
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
codesign -dvvvvvv /Applications/QuickPick.app/ | |
Executable=/Applications/QuickPick.app/Contents/MacOS/QuickPick | |
Identifier=com.araeliumgroup.macappstore.quickpick | |
Format=bundle with Mach-O universal (i386 x86_64) | |
CodeDirectory v=20100 size=2168 flags=0x200(kill) hashes=101+3 location=embedded | |
Hash type=sha1 size=20 | |
CDHash=5893876f1e6cbe9fa5f1abb790b515d244f931d0 | |
Signature size=4169 | |
Authority=Apple Mac OS Application Signing | |
Authority=Apple Worldwide Developer Relations Certification Authority |
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
intersects: (other) -> | |
((other.x >= @x && | |
other.x <= @x + @width) || | |
(other.x + other.width >= @x && | |
other.x + other.width <= @x + @width)) && | |
((other.y >= @y && | |
other.y <= @y + @height) || | |
(other.y + other.height >= @y && | |
other.y + other.height <= @y + @height)) |
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
MoveCircles: (deltaY) -> | |
for circle, i in circles # assuming numCires = circles.length, anyway... | |
do (circle) => | |
if circle[1] - circle[2] > height | |
circle[0] = Math.random() * width | |
circle[2] = Math.random() * 100 | |
circle[1] = 0 - circle[2] | |
circle[3] = Math.random() / 2 | |
else | |
circle[1] += deltaY |
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
// TODO use bindings for this, once I figure out the data model... | |
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView | |
{ | |
return [[[self document] attributes] count]; | |
} | |
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row | |
{ | |
assert(tableView == attributeTable); |
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
all: stuff | |
stuff: stuff.c | |
cc $< -o $@ | |
install: stuff | |
install -S $< /usr/local/bin | |
me: |
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
KatieHuber> it's not particularly hard to get OpenGL into a state where it requires more VRAM *at once* than is available (eg. an 8192x8192 FP32 texture is already 1GB), try drawing one of those to an 8192x8192 FP32 framebuffer and undefined behavior will result) | |
<Oddity007> Who in their right mind would allocate a texture that big? | |
<KatieHuber> but if your total VRAM required for one draw call is less than the total VRAM available on the card, that draw call should succeed | |
<Oddity007> MUST HAVE MOAR PIXELZZZZ | |
<KatieHuber> Oddity007: well, that was an example :P | |
<KatieHuber> people hit it on low VRAM cards with regular old 32-bit 4096x4096 textures (64M each) reasonably regularly | |
<KatieHuber> I think most cards have 512 now so hitting it with 4096 textures is pretty hard these days | |
<TheBunny> " in their right mind " | |
<TheBunny> Oh you assume so much about the average coder there... | |
<Oddity007> lol |
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
// clang __block_later.m -o __block_later -framework Foundation | |
// ./__block_later | |
#import <Foundation/Foundation.h> | |
static void (^ the_block)(void); | |
static void make_the_block(void) | |
{ | |
__block int n = 0; |
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
{ | |
gleUpdateState cond | |
Memcheck:Cond | |
fun:gleUpdateState | |
} | |
{ | |
gleUpdateLightColorChangeFunc cond | |
Memcheck:Cond | |
fun:gleUpdateLightColorChangeFunc |
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
#import <objc/runtime.h> | |
#import <Foundation/Foundation.h> | |
int main() | |
{ | |
Class c = [^(){} class]; | |
BOOL ok = class_addMethod( | |
c, | |
@selector(invoke), | |
imp_implementationWithBlock(^(void (^self)(void)){ |
OlderNewer