in case you haven't docker installed, please follow this instruction https://docs.docker.com/engine/install/ubuntu/
Create daemon.json
file in /etc/docker
, with content:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
#!/usr/bin/env bash | |
# Builds mpv & mpv.app on Apple silicon Macs. | |
# Run this script from the root directory of the mpv repo. | |
# if anything fails, gtfo | |
set -ex | |
meson setup build | |
meson compile -C build |
in case you haven't docker installed, please follow this instruction https://docs.docker.com/engine/install/ubuntu/
Create daemon.json
file in /etc/docker
, with content:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
AWS API Gateway has the ability to pre-authenticate connections prior to launching the endpoint, by passing the authorizationToken
to a Lambda function. There are clear benefits for simplifying end point security and also a reduction in duplicated code by utilising this feature. However I found the AWS examples were excessively complicated for what should be a very simple task.
So here's my example.
The main concern is that AWS Lambda authentication expects a very specific response and if that response is not given it will throw a 500 error with x-amzn-ErrorType: AuthorizerConfigurationException
in the response header if the response object is not exactly as expected.
I personally use to handle the publishing part of my Lambdas, but I'll include an image of the API Gateway config.
import UIKit | |
class CustomURLProtocol: URLProtocol { | |
struct Constants { | |
static let RequestHandledKey = "URLProtocolRequestHandled" | |
} | |
var session: URLSession? | |
var sessionTask: URLSessionDataTask? |
// Since the WKWebView has no sizeToFit() method, increase the frame height of the webView to | |
// match the height of the content's scrollHeight | |
// | |
// The WKWebView's `navigationDelegate` property needs to be set for the delegate method to be called | |
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { | |
if webView.isLoading == false { | |
webView.evaluateJavaScript("document.body.scrollHeight", completionHandler: { [weak self] (result, error) in | |
if let height = result as? CGFloat { |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
# If your project uses WebView with JS, uncomment the following | |
# and specify the fully qualified class name to the JavaScript interface | |
# class: | |
-keepclassmembers class fqcn.of.javascript.interface.for.webview { | |
public *; | |
} | |
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9) | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; |
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo "Missing argument" | |
echo "Usage : $0 <APPLICATION_PROJECT_DIRECTORY>" | |
exit 1; | |
fi | |
APPLICATION_PROJECT_DIRECTORY=$1 | |
echo "Optimizing PNGs with pngquant" |
// app module build.gradle | |
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion rootProject.compileSdkVersion | |
buildToolsVersion rootProject.buildToolsVersion | |
defaultConfig { | |
applicationId "com.segunfamisa.gradleextraproperties" | |
minSdkVersion rootProject.minSdkVersion | |
targetSdkVersion rootProject.targetSdkVersion |
--[[ | |
mpv 5-bands equalizer with visual feedback. | |
Copyright 2016 Avi Halachmi ( https://github.com/avih ) | |
License: public domain | |
Default config: | |
- Enter/exit equilizer keys mode: ctrl+e | |
- Equalizer keys: 2/w control bass ... 6/y control treble, and middles in between | |
- Toggle equalizer without changing its values: ctrl+E (ctrl+shift+e) |