Skip to content

Instantly share code, notes, and snippets.

@tvdstaaij
tvdstaaij / protobufjs-stringify-enums.js
Last active Jun 30, 2016
Convert ProtoBuf.js enum values to strings using reflection
View protobufjs-stringify-enums.js
var _ = require('lodash');
function stringifyEnums(message) {
_.forEach(message.$type.children, function(child) {
var type = _.get(child, 'element.resolvedType', null);
if (type && type.className === 'Enum' && type.children) {
var metaValue = _.find(type.children, {
id: message[child.name]
});
if (metaValue && metaValue.name)
View keybase.md

Keybase proof

I hereby claim:

  • I am tvdstaaij on github.
  • I am tvds (https://keybase.io/tvds) on keybase.
  • I have a public key whose fingerprint is A82C 61DD DE12 021A 8080 63B4 479A 97D4 0943 D5B2

To claim this, I am signing this object:

@tvdstaaij
tvdstaaij / PKGBUILD.patch
Created Sep 2, 2016
Arch Linux ibus-mozc-ut patch for kana as default input mode
View PKGBUILD.patch
--- PKGBUILD.orig 2016-09-02 14:28:07.722064884 +0200
+++ PKGBUILD.new 2016-09-02 14:30:38.228733627 +0200
@@ -138,6 +138,9 @@
cd "${srcdir}/mozc/"
+ # https://github.com/google/mozc/issues/381#issuecomment-242965044
+ sed -i 's/const bool kActivatedOnLaunch = false/const bool kActivatedOnLaunch = true/' src/unix/ibus/property_handler.cc
+
git submodule update --init --recursive
@tvdstaaij
tvdstaaij / keybase-github.md
Last active Sep 4, 2016
Set up a Keybase managed PGP key for use with git and Github
View keybase-github.md
@tvdstaaij
tvdstaaij / 5852.patch
Last active Nov 14, 2017
Arch Linux OpenCV 3.1.0 with Qt and CUDA
View 5852.patch
From 24dbb43c096691d0333cacf231e22f1369f8c826 Mon Sep 17 00:00:00 2001
From: Alexander Alekhin <alexander.alekhin@itseez.com>
Date: Tue, 22 Dec 2015 17:10:33 +0300
Subject: [PATCH] pkg-config: modules list contains only OpenCV modules (fixes
#5852)
---
cmake/OpenCVUtils.cmake | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)