Skip to content

Instantly share code, notes, and snippets.

@implementation NSObject (DDHacks)
+ (id)dd_autoalloc;
{
return [[self alloc] autorelease];
}
@end
// Option 1
NSString * string1 = [[NSString alloc] initWithFormat:@"foo"]
[array addObject:string1];
[string release];
// Option 2
NSString * string2 = [NSString stringWithFormat:@"bar"];
[array addObject2];
def foo
return [1, 2]
end
(left, right) = foo
puts left
puts right
Defaults passprompt="%u@%h's password: "
Defaults timestamp_timeout=15
;tiles arranged in order, 2 tiles per row, top to bottom
PlayerGraphicsTable:
;big player table
.db $00, $01, $02, $03, $04, $05, $06, $07 ;walking frame 1
.db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; frame 2
.db $10, $11, $12, $13, $14, $15, $16, $17 ; frame 3
.db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ;skidding
.db $20, $21, $22, $23, $24, $25, $26, $27 ;jumping
.db $08, $09, $28, $29, $2a, $2b, $2c, $2d ;swimming frame 1
.include "ines.h"
INesHeaderStart
INesPrgSizeInKilobytes 32
INesChrSizeInKilobytes 8
INesMapper = INesMapperNone
INesMirroring = INesMirroringHorizontal
INesHeaderEnd
class CARingBuffer {
public:
typedef SInt64 SampleTime;
CARingBuffer();
~CARingBuffer();
void Allocate(int nChannels, UInt32 bytesPerFrame, UInt32 capacityFrames);
// capacityFrames will be rounded up to a power of 2
void Deallocate();
[ui]
username = Dave Dribin <[email protected]>
archivemeta = False
editor = emacs
[extensions]
convert =
fetch =
color =
pager =
# I like to complete on everything typed so far, not just the first
# word. This is more like tcsh, too. :)
bindkey "^[p" history-beginning-search-backward
bindkey "^[n" history-beginning-search-forward
# Make completion case insensitive
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
set completion-ignore-case on
"\ep": history-search-backward
"\en": history-search-forward