Skip to content

Instantly share code, notes, and snippets.

View jturcotte's full-sized avatar

Jocelyn Turcotte jturcotte

View GitHub Profile
@jturcotte
jturcotte / qtbase-Support-EGL_ANGLE_surface_orientation-to-avoid-an-ex.patch
Last active November 18, 2016 11:30
Support EGL_ANGLE_surface_orientation to avoid an extra blit
From cf4dbaadeff8be28607c74c9d4bfea010af92d95 Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jturcotte@woboq.com>
Date: Fri, 24 Jun 2016 16:22:09 +0200
Subject: [PATCH] Support EGL_ANGLE_surface_orientation to avoid an extra blit
on each frame
This adds an UseOptimalOrientation option to QSurfaceFormat to let
EGL tell ANGLE that the application will take care of using Y-flipped
coordinates instead of having to do it through an intermediate surface
at the end.
@jturcotte
jturcotte / gerrit-submit.py
Created August 12, 2014 12:08
Submit a gerrit patch using it's local SHA1
#!/usr/bin/python
import subprocess
import sys
import re
import json
localCommit = sys.argv[1]
gitShow = subprocess.check_output(['git', 'show', '--no-patch', localCommit])
for line in gitShow.decode().splitlines():
@jturcotte
jturcotte / gist:6e33d74a6abe879011af
Last active August 29, 2015 14:01
QtWebEngine DevTool fix
From c01a0176ec22dbc6df6077abf8408d580f7f9cf7 Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Date: Thu, 6 Nov 2014 18:08:59 +0100
Subject: [PATCH] Quick fix of the inspector
Change-Id: Ic00976b537d6a9b4279cf5dfbf33bed32ab0089a
---
src/core/browser_context_qt.cpp | 12 +++-
src/core/browser_context_qt.h | 4 ++
src/core/content_browser_client_qt.cpp | 10 ---
#!/usr/bin/env python
import sys
import subprocess
import json
open_changes_qtwebengine = []
open_changes_qwebchannel = []
class GerritChange:
@jturcotte
jturcotte / gist:3912465
Created October 18, 2012 15:11
Terminator plugin to open paths in Sublime Text
import re
import terminatorlib.plugin as plugin
import subprocess
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
AVAILABLE = ['FileURLHandler']
class FileURLHandler(plugin.URLHandler):
capabilities = ['url_handler']
handler_name = 'file_path'
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@jturcotte
jturcotte / qmakeBuildOptionsExtractor.py
Created May 14, 2012 18:03
SublimeClang options_script to extract build options for a source file from a list of qmake build directories.
#!/usr/bin/env python
import sys, os.path, fnmatch, re, shlex, subprocess
def searchMakefile(where, visit, recursive):
if not os.path.exists(where):
return False
if recursive:
for root, dirname, filenames in os.walk(where):
for filename in fnmatch.filter(filenames, 'Makefile*'):
if visit(os.path.join(root, filename)):