This guide uses the domain your-domain.tld
and its www.
prefixed version.
It starts the rocket application on 127.0.0.1:1337
and as the user www-data
. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
public static class AutofacScanningExtensions | |
{ | |
public static IRegistrationBuilder<object, ScanningActivatorData, DynamicRegistrationStyle> | |
RegisterAssemblyTypesFromPath(this ContainerBuilder builder, string path) | |
{ | |
return RegisterAssemblyTypesFromPath(builder, path, null, a => true); | |
} | |
public static IRegistrationBuilder<object, ScanningActivatorData, DynamicRegistrationStyle> | |
RegisterAssemblyTypesFromPath(this ContainerBuilder builder, string path, Predicate<Assembly> Assemblyfilter) |
/* | |
* Copyright (c) 2015 Martin Donath | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.
Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.
His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the
defmodule MyApp.Telemetry do | |
require Logger | |
def handle_event([:my_app, :repo, :query], measurements, metadata, _config) do | |
milliseconds = System.convert_time_unit(measurements.total_time, :native, :millisecond) | |
# did the query take longer than 100ms? | |
if milliseconds > 100 do | |
# log it as a warning | |
Logger.warn("SLOW QUERY: ms: #{milliseconds}, query: #{metadata.query}") |