Skip to content

Instantly share code, notes, and snippets.

Avatar

mx1up

  • Belgium
View GitHub Profile
@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active Nov 24, 2020
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
View maven-publish-helper-usage.gradle
// You can use maven-publish-helper.gradle script without changes and even share it between multiple
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project,
// then apply it at the bottom of your module's build.gradle file like this:
// ...content of module's build.gradle file...
apply from: '../maven-publish-helper.gradle'
publishing {
publications {
@benediktg
benediktg / pam_kwallet-guide.md
Last active Nov 28, 2020
Short guide for pam_kwallet with KDE Plasma 5 on openSUSE
View pam_kwallet-guide.md

(based on these two blog entries and inspired by Fedora-Blog)

First install pam_kwallet:

sudo zypper in pam_kwallet

Then edit the files /etc/pam.d/passwd, /etc/pam.d/login and /etc/pam.d/sddm as follows, i.e. add the lines beginning with a - (the hyphens are valid PAM syntax to reduce log entries if these PAM modules should not exist) and ending with the ### comment:

/etc/pam.d/passwd :

@ruario
ruario / h264-vivaldi-linux.md
Last active Jun 12, 2020
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
@ilevantis
ilevantis / Mixcloud RSSifier
Last active Mar 30, 2020
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
View Mixcloud RSSifier
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
@shekibobo
shekibobo / README.md
Last active Mar 2, 2020
Android: Base Styles for Button (not provided by AppCompat)
View README.md

How to create custom button styles using Android's AppCompat-v7:21

Introduction

AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat and Widget.AppCompat namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button. Sure, there's Widget.AppCompat.Light.ActionButton, but that doesn't actually inherit from Widget.ActionButton, which does not inherit from Widget.Button, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton strictly belongs in the ActionBar.

So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.

Digging In

View fixyelo.js
(function () {
document.addEventListener('DOMContentLoaded', function () {
var script = document.createElement("script");
script.text = "window.Silverlight = { isInstalled: function() { return true; }, createObject: function() {}, };";
document.head.appendChild(script);
}, false);
})();
You can’t perform that action at this time.