Treat git log as a book, exec git next or git prev to checkout the next or the previous commit.
Please check hutusi/git-paging for updates.
| public class DynamicFragmentPagerAdapter extends PagerAdapter { | |
| private static final String TAG = "DynamicFragmentPagerAdapter"; | |
| private final FragmentManager fragmentManager; | |
| public static abstract class FragmentIdentifier implements Parcelable { //should be concrete children with @Parcelize if possible, don't forget CREATOR field | |
| private final String fragmentTag; | |
| private final Bundle args; | |
| public FragmentIdentifier(@NonNull String fragmentTag, @Nullable Bundle args) { |
| def localProperties = new Properties() | |
| def localPropertiesFile = rootProject.file('local.properties') | |
| if (localPropertiesFile.exists()) { | |
| localPropertiesFile.withReader('UTF-8') { reader -> | |
| localProperties.load(reader) | |
| } | |
| } | |
| def flutterRoot = localProperties.getProperty('flutter.sdk') | |
| if (flutterRoot == null) { |
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.util.AttributeSet | |
| import android.view.MotionEvent | |
| import android.view.ViewConfiguration | |
| import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |
| import kotlin.math.abs | |
| /** |
| cd ~/Library/Android/sdk/platform-tools/ | |
| # Get the hash of the mitmproxy-ca certificate. | |
| openssl x509 -inform PEM -subject_hash_old -in ~/.mitmproxy/mitmproxy-ca.pem | head -1 | |
| # We will use this hash value, append '.0' (dot zero) and use this as the filename for the resulting Android certificate | |
| cat ~/.mitmproxy/mitmproxy-ca.pem > c8750f0d.0 | |
| openssl x509 -inform PEM -text -in ~/.mitmproxy/mitmproxy-ca.pem -out /dev/null >> c8750f0d.0 | |
| # In an other terminal, we will start the emulator with writable /system volume |
| #include <stdio.h> | |
| #include <netinet/in.h> | |
| #include <stdlib.h> | |
| #include <sys/socket.h> | |
| #define PORT 8080 | |
| #define SA struct sockaddr | |
| int main() | |
| { | |
| int sockfd, connfd, len; |
Treat git log as a book, exec git next or git prev to checkout the next or the previous commit.
Please check hutusi/git-paging for updates.
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter | |
| from PyQt5.QtPrintSupport import QPrintDialog, QPrinter | |
| from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \ | |
| qApp, QFileDialog |
| /* | |
| * Copyright (C) 2019 Shen Lin | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| # modified from https://github.com/logcat-org/logcat.tmLanguage/blob/master/logcat-threadtime.YAML-tmLanguage | |
| # [PackageDev] target_format: plist, ext: tmLanguage | |
| --- | |
| name: Logcat (Android Studio) | |
| scopeName: source.logcat.android-studio | |
| fileTypes: [log, logcat] | |
| uuid: 4577654e-75a2-4892-981a-793e6132f289 | |
| firstLineMatch: -* beginning of /dev/log/.* |
| import android.content.Context | |
| import android.graphics.Canvas | |
| import android.graphics.Color | |
| import android.graphics.Paint | |
| import android.util.AttributeSet | |
| import android.view.View | |
| private const val N = 16 | |
| private const val PERIOD1 = -10000.0 | |
| private const val PERIOD2 = -500.0 |