Skip to content

Instantly share code, notes, and snippets.

@draekko
draekko / cherrypick_list.txt
Created February 14, 2019 09:27 — forked from filiprrs/cherrypick_list.txt
cherry-pick list
https://github.com/TeamNexus/android_frameworks_native/commit/eb315db646ffca7bd5e02eb82b680d2cb3a4981f
https://github.com/TeamNexus/android_hardware_interfaces/commit/4fa05e6ab7a1219dd33432abe653ad027fd93413
https://github.com/LineageOS/android_device_samsung_universal7880-common/commit/74292bbfcc88e1d0cdeaf89b3dcf042486898bb0
https://github.com/LineageOS/android_kernel_samsung_universal7880/commit/aeb5bcc6ce6e77e880f97f2bcf5f535c7ca99cda
/*
* Copyright (C) 2009 The Android Open Source Project
* Copyright (C) 2015 Benoit Touchette
* Copyright (C) 2019 Benoit Touchette
*
* 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
@draekko
draekko / CachedDocumentFile.java
Created April 26, 2018 14:55 — forked from bubbleguuum/CachedDocumentFile.java
Improve DocumentFile performance
package android.support.v4.provider;
import android.net.Uri;
import android.support.v4.provider.DocumentFile;
public class CachedDocumentFile extends DocumentFile {
final DocumentFile mWrapped;
final boolean mCacheChildren;
@draekko
draekko / DRChronometer.java
Created November 7, 2017 21:43
Chronometer class to display timer in HH:MM:SS format based on the Android Chronometer class.
/*
* Copyright (C) 2008 The Android Open Source Project
* Copyright (C) 2017 Benoit Touchette (Draekko RAND)
*
* 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
*
SQLCipher for Android 64bit with OpenSSL 1.1.0
==============================================
Note for my purposes min. api is set to 21 to support 64bitness.
Download and save sqlcipher-x64-pt1.diff & sqlcipher-x64-pt1.diff
to your git folder.
git clone git@github.com:sqlcipher/android-database-sqlcipher.git
cd android-database-sqlcipher
patch -p1 < sqlcipher-x64-pt1.diff
@draekko
draekko / darktable-workflow.md
Created July 26, 2016 18:16 — forked from eimajtrebor/darktable-workflow.md
My Darktable Workflow

My Darktable Workflow

Basic workflow

  • Copy a film roll (a directory of RAW images) into a directory on the machine running Darktable.
  • Import the film roll into Darktable.
  • Review the images using lighttable mode and remove any images that are beyond repair.
  • Take a snapshot of the image so we can do a before and after comparison.
  • Adjust the white balance.
  • Exposure compensation and recovery.
/*
* Copyright (C) 2009 The Android Open Source Project
* Copyright (C) 2015 Benoit Touchette
*
* 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
*
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import android.app.Activity;
import android.content.Context;
@draekko
draekko / how-to-monitor-the-progress-of-dd.txt
Last active January 14, 2016 13:19
how to monitor the progress of dd (ubuntu)
Install pv and put it between input / output only dd commands.
Note: you cannot use it when you already started dd.
From the package description:
pv - Pipe Viewer - is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.
Installation
sudo apt-get install pv
Example
dd if=/dev/urandom | pv | dd of=/dev/null
@draekko
draekko / Readme.txt
Created November 29, 2015 23:54 — forked from endolith/Readme.txt
Gnome to Wine color scraper
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
Instructions:
1. Set your Gnome theme as you would like it
2. Run with a command like "python wine_colors_from_gtk.py"
3. Restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper