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 <string.h> | |
#include <arpa/inet.h> | |
#pragma pack(push, 1) | |
typedef struct { | |
char magic[6]; | |
unsigned short iInstrumentBlockOffset; | |
unsigned short iMusicOffset; |
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 <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <dirent.h> | |
#pragma pack(push, 1) | |
/* Library Header */ | |
typedef struct { |
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 <stdlib.h> | |
#include <string.h> | |
// #include <malloc.h> | |
// #include <windows.h> | |
#ifdef GCC32HACK | |
#include "win32gcc.h" | |
#endif |
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
//------------------------------------------------ | |
//--- 010 Editor v10.0.2 Binary Template | |
// | |
// Authors: Jorge Cohen <me@jorgecohen.codes> | |
// | |
//------------------------------------------------ | |
typedef struct | |
{ | |
WORD MZSignature <comment="IMAGE_DOS_SIGNATURE = 0x5A4D",format=hex>; |
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
// Declare enums like so: | |
#define IMAGE_STATUS(XX) \ | |
XX(kDOImageStatusOK, = 0) \ | |
XX(kDOImageStatusCached, )\ | |
XX(kDOImageStatusRetry, ) | |
DECLARE_ENUM(DOImageStatus, IMAGE_STATUS) |
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
var application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
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
var memwatch = require('memwatch-next'); | |
var heapdump = require('heapdump'); | |
memwatch.on('leak', function(info) { | |
console.error(info); | |
var file = '/tmp/myapp-' + process.pid + '-' + Date.now() + '.heapsnapshot'; | |
heapdump.writeSnapshot(file, function(err){ | |
if (err) console.error(err); | |
else console.error('Wrote snapshot: ' + file); | |
}); |
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
. . . | |
navigator.googleInternal = { | |
iframe_: undefined, | |
isInitialized: false, | |
init: function() { | |
if (this.isInitialized) { | |
return; | |
} | |
this.iframe_ = document.createElement('iframe'); |
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> | |
(void)instrumentObjcMessageSends(YES); //to start | |
(void)instrumentObjcMessageSends(NO); //to stop | |
// print result: tail -100f /tmp/msgSends-XXXX | |
// Source: http://bonto.ch/blog/2012/05/30/log-all-messages-in-objective-c/ |
NewerOlder