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
[Unit] | |
Description=Simple tool to enable or disable the SMBIOS fan (auto) fan control on Dell laptops | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/local/bin/dell-bios-fan-control 0 | |
RemainAfterExit=yes | |
ExecStop=/usr/local/bin/dell-bios-fan-control 1 | |
StandardOutput=journal |
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
# 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 |
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
#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 https://www.reddit.com/r/Dell/comments/9pdgid/configuring_the_xps_to_play_nice_with_linux/ | |
#Added force=1 per https://askubuntu.com/questions/1094485/dell-xps-15-9570-how-to-control-the-fans |
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
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" |
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
public class RxjavaBitmapMergeView { | |
SchedulersFacade schedulersFacade; | |
@BindView(R.id.map) | |
ImageView map; | |
@BindArray(R.array.impact_map_colors) | |
@ColorInt | |
int[] mapColors; |
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
//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 { |
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
/** | |
* {@link AppGlideModule} for the app | |
*/ | |
@Excludes(OkHttpLibraryGlideModule.class) | |
@GlideModule | |
public class MyAppGlideModule extends AppGlideModule { | |
//Below override should only be used if not using legacy modules registered via manifest | |
@Override | |
public boolean isManifestParsingEnabled() { |
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
Toolbar toolbar; | |
//Call initToolBarMenuIcons after you've inflated the layout into your Activity/Fragment that holds your Toolbar. | |
@MainThread | |
@SuppressLint("NewApi") //suppress warning, since using DrawableCompat to set tint | |
public void initToolBarMenuIcons() { | |
toolbar.inflateMenu(R.menu.main); | |
//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 |
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
<FrameLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<!--Below FrameLayout doesn't need to be a FrameLayout. Any ViewGroup will do --> | |
<FrameLayout | |
android:id="@+id/content" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" |