Skip to content

Instantly share code, notes, and snippets.

View smokris's full-sized avatar
🐢
Slow

Steve Mokris smokris

🐢
Slow
View GitHub Profile
diff --git a/src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php b/src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php
index 1cb0f107a..d54877cee 100644
--- a/src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php
+++ b/src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php
@@ -37,7 +37,7 @@ final class DiffusionSubversionWireProtocol extends Phobject {
$match = null;
$result = null;
$buf = $this->buffer;
- if (preg_match('/^([a-z][a-z0-9-]*)\s/i', $buf, $match)) {
+ if (preg_match('/^([a-z][a-z0-9-]*)\s+/i', $buf, $match)) {

Keybase proof

I hereby claim:

  • I am smokris on github.
  • I am smokris (https://keybase.io/smokris) on keybase.
  • I have a public key whose fingerprint is BB78 1CDE FE38 C6C9 C6A3 1938 B58B 6886 3469 B9AA

To claim this, I am signing this object:

[NSEvent addLocalMonitorForEventsMatchingMask:NSKeyDownMask handler:^(NSEvent *event) {
// Cmd+Shift+O (Open Most Recent File)
if ((event.modifierFlags & NSCommandKeyMask)
&& (event.modifierFlags & NSShiftKeyMask)
&& (event.keyCode == kVK_ANSI_O))
{
editor->openMostRecentFile();
return (NSEvent *)nil; // event was handled by this monitor (avoids the system beep)
}
@smokris
smokris / gist:7711889
Last active December 29, 2015 18:39
Pooling GL_ELEMENT_ARRAY_BUFFERs
static vector<GLuint> elementArrayBufferPool;
static dispatch_semaphore_t elementArrayBufferPoolSemaphore;
static void __attribute__((constructor)) elementArrayBufferPoolInit(void)
{
elementArrayBufferPoolSemaphore = dispatch_semaphore_create(1);
}
GLuint getUnusedElementArrayBufferFromPool(void)
{
GLuint name = 0;
@smokris
smokris / gist:7685817
Last active December 29, 2015 14:39
Check for stale bindings before throwing a GL context back into the pool.
...
/**
* Check whether the specified attachment point @c pname is still bound.
* (This is defined as a macro in order to stringify the argument.)
*/
#define VuoGlCheckBinding(pname) \
{ \
GLint value; \
glGetIntegerv(pname, &value); \