Skip to content

Instantly share code, notes, and snippets.

View mutaphysis's full-sized avatar
🏠
Working from home

Henrik Hinrichs mutaphysis

🏠
Working from home
View GitHub Profile
export function translatedStringFromObject(localizedString: ?LocalizedString): ?string {
if (!localizedString) return null;
if (typeof localizedString === 'string') {
return localizedString;
}
if (typeof localizedString === 'object') {
const expandedLocalizedString = { ...localizedString };
// add locales without country
for (const underscoreLocale in localizedString) {
@mutaphysis
mutaphysis / translatelinks.js
Created November 6, 2018 10:42
Link Translation snippet
@mutaphysis
mutaphysis / protobuf-std.rb
Created April 10, 2015 16:24
protobuf-std.rb tap for homebrew (2.6.1)
class ProtobufStd < Formula
homepage "https://github.com/google/protobuf/"
url 'https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2'
sha1 '6421ee86d8fb4e39f21f56991daa892a3e8d314b'
devel do
url "https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz"
sha256 "46df8649e2a0ce736e37f8f347f92b32a9b8b54d672bf60bd8f6f4d24d283390"
version "3.0.0-alpha-2"
@mutaphysis
mutaphysis / protobuf-std.rb
Last active August 29, 2015 14:18
protobuf-std.rb tap for homebrew
require 'formula'
class ProtobufStd < Formula
homepage 'http://code.google.com/p/protobuf/'
url 'http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
sha1 '62c10dcdac4b69cc8c6bb19f73db40c264cb2726'
option :universal
option :cxx11
### Keybase proof
I hereby claim:
* I am mutaphysis on github.
* I am mutaphysis (https://keybase.io/mutaphysis) on keybase.
* I have a public key whose fingerprint is 107C 0A78 98EF A6CB 37A4 E071 3E14 6044 0D9C 1FC2
To claim this, I am signing this object: