If Firefox does not find Chromium in the Import wizard, create a symlink from ~/.config/chromium
to /.config/google-chrome
. Then Chrome and Chromium should appear in the Import wizard window. Select Chromium, what type of data to import and it should work.
This file contains hidden or 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
version: '2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.3 | |
environment: | |
- "discovery.type=single-node" | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
networks: |
This file contains hidden or 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
#!/usr/bin/bash | |
# Copyright 2017 Gregor Kralik <g.kralik (at) gmail.com> | |
# | |
# 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 | |
# |
This file contains hidden or 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
Secenario: running Kodi and MPD. Kodi should output sound via HDMI, | |
MPD should use the 3.5mm jack. | |
aplay -l lists available devices: | |
**** List of PLAYBACK Hardware Devices **** | |
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] | |
Subdevices: 7/8 | |
Subdevice #0: subdevice #0 | |
Subdevice #1: subdevice #1 |
This file contains hidden or 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
function embedInCData($str) | |
{ | |
$dom = new \DOMDocument(); | |
$cdata = $dom->createCDATASection($str); | |
return $dom->saveXML($cdata); | |
} | |
// usage: | |
echo embedInCData('<strong>foobar</strong>'); | |
// <![CDATA[<strong>foobar</strong>]]> |
This file contains hidden or 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
zone "blacklisted.domain" {type master; file "/etc/bind/blockeddomains.db";}; |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys | |
import socket | |
import ssl | |
import datetime | |
# based on https://serverlesscode.com/post/ssl-expiration-alerts-with-lambda/ | |
# | |
# Usage: check_ssl_expiry.py <hostname> [port] [gracetime_days] | |
# port Port to check (defaults to 443) |
This file contains hidden or 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
# from http://stackoverflow.com/a/246128 | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
BASE_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done | |
BASE_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
This file contains hidden or 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
Detect if ClickOnce is (or rather: might be) supported by the browser. | |
This is partly based on https://gist.github.com/adunkman/2371101. | |
If the userAgent string does not contain a .NET feature hint, | |
we settle for everything that looks like an IE, because .NET | |
is installed nearly everywhere nowadays. | |
It might also be a good idea to check for the X-ClickOnceSupport | |
header on the server side. |
NewerOlder