Skip to content

Instantly share code, notes, and snippets.

View ryandesign's full-sized avatar

Ryan Carsten Schmidt ryandesign

View GitHub Profile
--- TUTORIAL.txt.orig 2011-11-02 00:47:43.000000000 -0500
+++ TUTORIAL.txt 2011-11-02 00:48:07.000000000 -0500
@@ -26,7 +26,7 @@
Some directories must be writable so that the webserver (assuming it
runs under a different user) can store files in there.
-$ chmod −R a+rwX webroot/media/{transfer,filter}
+$ chmod -R a+rwX webroot/media/{transfer,filter}
Expanding on the blog tutorial we add the following fields to our
@ryandesign
ryandesign / mongo-objc-driver-snprintf.diff
Created November 11, 2011 00:21
Fix mongo-objc-driver warning when compiled with gcc
warning: '0' flag ignored with precision and '%X' printf format
--- Sources/MODBinary.m.orig 2011-11-08 15:00:08.000000000 -0600
+++ Sources/MODBinary.m 2011-11-10 17:54:06.000000000 -0600
@@ -47,7 +47,7 @@
bufferString = malloc(([_data length] * 2) + 1);
count = [_data length];
for(ii = 0; ii < count; ii++) {
- snprintf(bufferString + (ii * 2), 3, "%0.2X", bytes[ii]);
+ snprintf(bufferString + (ii * 2), 3, "%.2X", bytes[ii]);
}
@ryandesign
ryandesign / project.pbxproj.diff
Created November 11, 2011 00:37
Fix MongoHub error "must have a 64bit int type" when using gcc
error: #error must have a 64bit int type
--- MongoHub.xcodeproj/project.pbxproj.orig 2011-11-10 18:00:13.000000000 -0600
+++ MongoHub.xcodeproj/project.pbxproj 2011-11-10 18:04:37.000000000 -0600
@@ -1480,6 +1480,7 @@
"$(inherited)",
"\"$(SRCROOT)\"/Frameworks",
);
+ GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREFIX_HEADER = MongoHub_Prefix.pch;
@ryandesign
ryandesign / ImportWindowController.m.diff
Created November 11, 2011 00:43
Fix MongoHub error "incompatible block pointer types initializing 'void (^)()', expected 'dispatch_block_t'" when using gcc
error: incompatible block pointer types initializing 'void (^)()', expected 'dispatch_block_t'
--- ImportWindowController.m.orig 2011-11-01 09:02:57.000000000 -0500
+++ ImportWindowController.m 2011-11-10 17:49:01.000000000 -0600
@@ -121,7 +121,7 @@
}
dispatch_queue_t myQueue = dispatch_queue_create("com.mongohub.mysql", 0);
- dispatch_async(myQueue, ^() {
+ dispatch_async(myQueue, ^ {
long long total = [self importCount:tableName];
@ryandesign
ryandesign / qupzilla_2012-01-05-195358.crash
Created January 6, 2012 01:56
qupzilla OS X crash after having accessed Help menu
Process: qupzilla [3995]
Path: /opt/local/Applications/QupZilla.app/Contents/MacOS/qupzilla
Identifier: com.yourcompany.qupzilla
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [229]
Date/Time: 2012-01-05 19:53:57.100 -0600
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
@ryandesign
ryandesign / nodejs-0.6.7-main.log
Created January 23, 2012 03:30
node.js 0.6.8 build failure / 0.6.7 build success on Leopard i386
version:1
:msg:main ---> Computing dependencies for nodejs:msg:main
:debug:main Checking for conflicts against nodejs
:debug:main Searching for dependency: nodejs-devel
:debug:main Didn't find receipt, going to depspec regex for: nodejs-devel
:debug:main Searching for dependency: pkgconfig
:debug:main Found Dependency: receipt exists for pkgconfig
:debug:main Searching for dependency: python27
:debug:main Found Dependency: receipt exists for python27
:debug:main Searching for dependency: openssl
@ryandesign
ryandesign / src-Info.plist.diff
Created January 27, 2012 01:20
Patch to fix QupZilla's Info.plist file
--- a/src/Info.plist
+++ b/src/Info.plist
@@ -14,7 +14,7 @@
<string>@EXECUTABLE@</string>
<key>CFBundleIdentifier</key>
<string>com.qupzilla.QupZilla</string>
-
+ <key>CFBundleDocumentTypes</key>
<array>
<dict>
@ryandesign
ryandesign / QupZilla-app-bundle.diff
Created January 27, 2012 01:59
Fix QupZilla's application bundling
diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp
index 692d5d8..2961e6f 100644
--- a/src/app/mainapplication.cpp
+++ b/src/app/mainapplication.cpp
@@ -101,7 +101,7 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
#endif
#ifdef Q_WS_MAC
- DATADIR.append("Resources/");
+ DATADIR.append("../Resources/");
@ryandesign
ryandesign / contentloaded.js.diff
Created January 28, 2012 12:30
Modify contentloaded.js callback to allow specifying what to use for "this"
--- contentloaded.js.orig
+++ contentloaded.js
@@ -15,12 +15,14 @@
// @win window reference
// @fn function reference
-function contentLoaded(win, fn) {
+function contentLoaded(win, fn, thisp) {
var done = false, top = true,
Process: qupzilla [6169]
Path: /opt/local/Applications/QupZilla.app/Contents/MacOS/qupzilla
Identifier: com.qupzilla.QupZilla
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [243]
Date/Time: 2012-01-28 09:10:19.121 -0600
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6