Skip to content

Instantly share code, notes, and snippets.

@rubenv
rubenv / fixyelo.js
Created October 3, 2014 13:30
Fix Yelo.be
(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);
})();
@shekibobo
shekibobo / README.md
Last active March 2, 2020 11:04
Android: Base Styles for Button (not provided by AppCompat)

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

@ruario
ruario / h264-vivaldi-linux.md
Last active March 18, 2023 11:17
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
@benediktg
benediktg / pam_kwallet-guide.md
Last active May 14, 2023 14:48
Short guide for pam_kwallet with KDE Plasma 5 on openSUSE

(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 :

@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active June 15, 2023 04:22
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
// 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 {
@xrad
xrad / iso_ffi.dart
Created September 14, 2023 17:11
Simple Dart example to demonstrate shared memory for Isolates
import 'dart:ffi';
import 'dart:isolate';
import 'dart:io';
import 'package:ffi/ffi.dart';
void newIsolate(SendPort sendPort) {
final ptr = calloc.allocate<Int>(100);
ptr[0] = 42;
sendPort.send(ptr.address);
sleep(const Duration(seconds: 1));
@ilevantis
ilevantis / Mixcloud RSSifier
Last active February 15, 2024 08:38
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
<?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/';
@lmarkus
lmarkus / README.MD
Last active March 27, 2024 07:15
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...