Skip to content

Instantly share code, notes, and snippets.

🌸
Is this the new ICQ?

Pascal Hartig passy

🌸
Is this the new ICQ?
Block or report user

Report or block passy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d88b3e15fcf486fb90df53e564ccaafb
~/D/react-native    ./gradlew :ReactAndroid:tasks 9.3s  Tue 26 Nov 14:58:29 2019
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/realpassy/Downloads/react-native/ReactAndroid/build.gradle' line: 101
* What went wrong:
View gist:27c274b5b9e447678d0bf0ed7363c179
/home/realpassy/local/fbsource/xplat/sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/ViewDescriptor.java:44: error: package com.facebook.stetho.common.android does not exist
import com.facebook.stetho.common.android.ResourcesUtil;
^
/home/realpassy/local/fbsource/xplat/sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/ActivityDescriptor.java:17: error: package com.facebook.stetho.common.android does not exist
import com.facebook.stetho.common.android.FragmentActivityAccessor;
^
/home/realpassy/local/fbsource/xplat/sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/ActivityDescriptor.java:18: error: package com.facebook.stetho.common.android does not exist
import com.facebook.stetho.common.android.FragmentCompat;
^
/home/realpassy/local/fbsource/xplat/sonar/android/src/main/java/com/facebook/flipper/plu
View gist:1cf4d56eb2f252cc09292c62f87da0b0
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/plugins/network/ManageMockResponsePanel.js:22:9
Cannot import the type Route as a value. Use import type instead.
19│ ContextMenu,
20│ } from 'flipper';
21│
22│ import {Route} from './types';
23│
24│ import {MockResponseDetails} from './MockResponseDetails';
View gist:cf768f3c14196f9e189ac01a7976f3c0
$ unzip -l android/build/outputs/aar/sonar-release.aar | rg jni
0 02-01-1980 00:00 jni/
0 02-01-1980 00:00 jni/arm64-v8a/
1005520 02-01-1980 00:00 jni/arm64-v8a/libc++_shared.so
276584 02-01-1980 00:00 jni/arm64-v8a/libevent.so
182056 02-01-1980 00:00 jni/arm64-v8a/libevent_core.so
276584 02-01-1980 00:00 jni/arm64-v8a/libevent_extra.so
3062960 02-01-1980 00:00 jni/arm64-v8a/libfolly.so
161680 02-01-1980 00:00 jni/arm64-v8a/libglog.so
961288 02-01-1980 00:00 jni/arm64-v8a/librsocket.so
View collapse.hs
data Tree a = Empty | Node a (Tree a) (Tree a)
deriving Show
type IntTree = Tree Int
collapse :: IntTree -> [Int]
collapse t =
case t of
Empty -> [-1]
Node a Empty r -> a : -1 : collapse r
View gist:cf74893716af6125ccb2112bed7608a6
data Tree a = Empty | Node a (Tree a) (Tree a)
deriving Show
type IntTree = Tree Int
collapse :: IntTree -> [Int]
collapse t =
case t of
Empty -> [-1]
Node a Empty r -> a : -1 : collapse r
View codemod_litho_layout.py
#!/usr/bin/env python
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("file")
args = parser.parse_args()
View Term.kt
sealed class Term
data class Num(val n: Int) : Term()
data class Var(val name: String) : Term()
data class Mul(val l: Term, val r: Term) : Term()
data class Add(val l: Term, val r: Term) : Term()
fun simplify(term: Term): Term =
when (term) {
Mul(Num(0), x) -> Num(0),
Mul(Num(1), x) -> x,
View gist:ff8162eef03d9250f3779c03f071f4ea
Verifying my Blockstack ID is secured with the address 18Uquf8bAjtNmV3DeTccAWpZZrVzG6Ba6E https://explorer.blockstack.org/address/18Uquf8bAjtNmV3DeTccAWpZZrVzG6Ba6E
View litho.diff
commit 9957e3b5fae1cd14a7173811253dc11769729869
Author: Pascal Hartig <phartig@rdrei.net>
Date: Wed Oct 25 10:00:42 2017 +0100
Remove now redundant @JvmStatic
diff --git a/sample-kotlin/src/main/java/com/fblitho/lithoktsample/lithography/components/FavouriteButtonSpec.kt b/sample-kotlin/src/main/java/com/fblitho/lithoktsample/lithography/components/FavouriteButtonSpec.kt
index 7a1178d20..9822060da 100755
--- a/sample-kotlin/src/main/java/com/fblitho/lithoktsample/lithography/components/FavouriteButtonSpec.kt
+++ b/sample-kotlin/src/main/java/com/fblitho/lithoktsample/lithography/components/FavouriteButtonSpec.kt
You can’t perform that action at this time.