Skip to content

Instantly share code, notes, and snippets.

View dptsolutions's full-sized avatar

Don Phillips dptsolutions

  • Los Angeles, CA
View GitHub Profile
Description=Simple tool to enable or disable the SMBIOS fan (auto) fan control on Dell laptops
ExecStart=/usr/local/bin/dell-bios-fan-control 0
ExecStop=/usr/local/bin/dell-bios-fan-control 1
dptsolutions / i8kmon.conf
Created September 29, 2019 18:02
i8kmon.conf file for Dell XPS 13 9350
# Sample i8kmon configuration file (/etc/i8kmon.conf, ~/.i8kmon).
# External program to control the fans
set config(i8kfan) /usr/bin/i8kfan
# Enable/Disable user configuration file at ~/.i8kmon (0 = Disable, 1 = Enable)
set config(use_conf) 0
# Report status on stdout, override with --verbose option
set config(verbose) 0
dptsolutions / dell-smm-hwmon.conf
Created September 29, 2019 18:00
dell-smm-hwmon.conf to force loading of dell-smm-hwmon module on "unsupported" Dell laptops (like XPS 13 9350)
#Force loading of the Dell Laptop SMM BIOS hwmon driver
options dell-smm-hwmon ignore_dmi=1 restricted=0 force=1
#Added ignore_dmi=1 per
#Added force=1 per
dptsolutions / MimeTypes.kt
Last active April 6, 2021 11:12 — forked from markwhitaker/
Standard MIME type constants ready to use in a Kotlin project
object MimeTypes {
object Application {
const val ATOM_XML = "application/atom+xml"
const val ATOMCAT_XML = "application/atomcat+xml"
const val ECMASCRIPT = "application/ecmascript"
const val JAVA_ARCHIVE = "application/java-archive"
const val JAVASCRIPT = "application/javascript"
const val JSON = "application/json"
const val MP4 = "application/mp4"
const val OCTET_STREAM = "application/octet-stream"
dptsolutions /
Last active April 25, 2018 20:27
Using RxJava 2 to tint & merge an arbitrary number of Bitmaps into a single Bitmap and display the merged bitmap into an ImageView
public class RxjavaBitmapMergeView {
SchedulersFacade schedulersFacade;
ImageView map;
int[] mapColors;
dptsolutions / gist:31e06d0990b7e18cea48b8277f152d7a
Created April 16, 2018 20:14
Name APK output file in following format - {AppName}-{ProductFlavorName}-{BuildTypeName}-{shortGitSha}.apk (Works with Android Gradle Plugin 3.x)
//1. Put this file in the root of your project
//2. Add apply from: "../artifacts.gradle" to the end of your app module's build.gradle file
android.applicationVariants.all { variant ->
def appName
def shortGitSha = 'git rev-parse --short HEAD'.execute().text.trim()
//Check if an applicationName property is supplied; if not use the name of the parent project.
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
dptsolutions /
Created July 2, 2017 22:11
Example AppGlideModule Injecting OkHttpClient using Dagger 2
* {@link AppGlideModule} for the app
public class MyAppGlideModule extends AppGlideModule {
//Below override should only be used if not using legacy modules registered via manifest
public boolean isManifestParsingEnabled() {
dptsolutions /
Last active December 6, 2017 12:18
Vector Drawables used as menu icons at all API Levels
Toolbar toolbar;
//Call initToolBarMenuIcons after you've inflated the layout into your Activity/Fragment that holds your Toolbar.
@SuppressLint("NewApi") //suppress warning, since using DrawableCompat to set tint
public void initToolBarMenuIcons() {
//Manually adding icon since it's a vector drawable and we can't currently inflate from XML into menuitems
Drawable wrappedLogoutIcon = DrawableCompat.wrap(AppCompatResources.getDrawable(getContext(), R.drawable.ic_logout_black_24dp));
//Tint it too
<!--Below FrameLayout doesn't need to be a FrameLayout. Any ViewGroup will do -->