View trap.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Darwin | |
enum Signal: Int32 { | |
case HUP = 1 | |
case INT = 2 | |
case QUIT = 3 | |
case ABRT = 6 | |
case KILL = 9 | |
case ALRM = 14 | |
case TERM = 15 |
View trace.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct StackFrame { | |
let symbol: String | |
let file: String | |
let address: UInt64 | |
let symbolAddress: UInt64 | |
var demangledSymbol: String { | |
return _stdlib_demangleName(symbol) | |
} | |
} |
View build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.applicationVariants.all { variant -> | |
String propsName = "../local/${variant.baseName}.properties" | |
Properties props = new Properties() | |
props.load(new FileInputStream(file(propsName))) | |
println "Building \"${variant.baseName}\" tag..." | |
props.stringPropertyNames().forEach { | |
variant.resValue("string", it, props[it]) | |
} |
View gh-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import asyncio | |
import time | |
import socket | |
import argparse | |
import aiohttp | |
class MyConnector(aiohttp.TCPConnector): |
View trial.key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Beyond Compare 4 | |
Licensed to: ASIO Allsoftinone | |
Quantity: 1 user | |
Serial number: 1822-9597 | |
License type: Pro Edition for Windows | |
--- BEGIN LICENSE KEY --- | |
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ | |
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja | |
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t |
View use-bbdiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global diff.tool bbdiff | |
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"' | |
git config --global difftool.prompt false | |
git config --global merge.tool bbdiff | |
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"' | |
Double check ~/.gitconfig |
View RxBus2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @yokeyword's Rxbus is here: https://github.com/YoKeyword/RxBus/blob/master/rxbus/src/main/java/me/yokeyword/rxbus/RxBus.java | |
package com.example.myproduct.lib.common.utils.rx.eventbus; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import io.reactivex.Flowable; | |
import io.reactivex.processors.FlowableProcessor; |
View onErrorResumeNext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RxView.clicks(mIvTestGlide) // 只发出 onNext 事件的事件源 | |
.flatMap(new Function<Object, ObservableSource<Object>>() { | |
@Override | |
public ObservableSource<Object> apply(Object o) throws Exception { | |
// another observable which can throw onError. | |
return Observable.error(new Exception("模拟发生错误的地方!!!")) | |
.doOnError(new Consumer<Throwable>() { | |
@Override | |
public void accept(Throwable throwable) throws Exception { | |
// TODO : 由于下面的 onErrorResumeNext, 因此 error 事件无法传递到"订阅者 observer", 故需要在这里做处理. |