I hereby claim:
- I am petitjam on github.
- I am alex_p (https://keybase.io/alex_p) on keybase.
- I have a public key ASA-IpgClDB6YWwt9nSIqekxoRiCDkOSNtZcKzoIbrwnnwo
To claim this, I am signing this object:
<TextView | |
android:id="@+id/textView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginStart="16dp" | |
android:layout_marginEnd="16dp" | |
android:ellipsize="end" | |
android:maxLines="4" | |
app:layout_constrainedWidth="true" | |
app:layout_constraintEnd_toEndOf="parent" |
window.ProjectName.SomeModel = {} | |
window.ProjectName.SomeModel.SomeConstants = {} | |
<% SomeModel::SomeConstants.constants.each do |constant| %> | |
window.ProjectName.SomeModel.SomeConstants.<%= constant %> = "<%= SomeModel::SomeConstants.const_get(constant) %>" | |
<% end %> |
/** | |
* The [swipeRefreshLayout] will "steal" the swipe gesture from the [nestedWebView] | |
* when the user tries to scroll up on the web page. This class adds a | |
* [ViewTreeObserver.OnScrollChangedListener] to [swipeRefreshLayout] to disable | |
* refreshing while [nestedWebView] is not scrolled all the way to the top. | |
*/ | |
class NestedWebViewScrollingSwipeRefreshLayoutFixer( | |
private val swipeRefreshLayout: SwipeRefreshLayout, | |
private val nestedWebView: WebView) | |
: LifecycleObserver { |
class SwipeRefreshAwareWebViewClient(private val swipeRefreshLayout: SwipeRefreshLayout) | |
: WebViewClient() { | |
override fun onReceivedHttpError(view: WebView?, request: WebResourceRequest?, errorResponse: WebResourceResponse?) { | |
Timber.d("errorResponse: %s", errorResponse?.data) | |
swipeRefreshLayout.isRefreshing = false | |
super.onReceivedHttpError(view, request, errorResponse) | |
} | |
override fun onReceivedError(view: WebView?, request: WebResourceRequest?, error: WebResourceError?) { |
I hereby claim:
To claim this, I am signing this object:
adb shell screencap -p /sdcard/screencap.png | |
adb pull /sdcard/screencap.png ./$1.png |
/* | |
* Paste the following into a new bookmark, then click it on | |
* a GitHub PR to mark all the yucky Pod files as viewed. | |
*/ | |
javascript:Array.from(document.querySelectorAll('a[title*=".xcodeproj"],a[title$=".storyboard"],a[title$=".pbxproj"],a[title^="Pods/"],a[title="Podfile.lock"]')).map(el => el.closest('.file-header').querySelector('.js-reviewed-checkbox')).forEach(function(el, i) { if (!el.checked) { el.click() } }) | |
/* | |
* Readable version | |
*/ |
ffmpeg -i file.mp4 -r 15 -vf scale=512:-1 file.gif |
$('.c5e-project-card-project-name').map(function() { return $(this).text() }).toArray().join(", ") |
adb shell screencap -p /sdcard/screencap.png | |
# Get the screenshot and redirect command output to nowhere so it's quiet. | |
adb pull /sdcard/screencap.png /tmp/adbcp.png > /dev/null | |
xclip -selection clipboard -t image/png -i /tmp/adbcp.png | |
echo Screenshot copied to clipboard! |