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
defmodule Wrench.Hex.Api.Requester do | |
use GenServer | |
require Logger | |
@config Application.get_env(:wrench, __MODULE__) | |
@api_key @config[:api_key] | |
@ua "Wrench/#{Application.spec(:wrench, :vsn)} (contact #{Application.get_env(:wrench, :operator_contact)})" | |
@endpoint "https://hex.pm/api" | |
def start_link(opts) do |
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
defp clear_record_id_error(changeset) do | |
errors = | |
changeset.errors | |
|> Enum.filter(fn | |
{:record_id, _} -> false | |
_ -> true | |
end) | |
if Enum.empty?(errors) do | |
%{changeset | errors: [], valid?: true} |
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
0 tests, 0 benchmarks | |
encoding_any_prop: test | |
encoding_prop: test | |
2 tests, 0 benchmarks | |
test::json_any_array: test | |
test::json_any_bool: test | |
test::json_any_map: test | |
test::json_any_null: test | |
test::json_any_number: test |
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
Jun 05 01:44:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:44:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:44:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:45:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:45:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:45:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:46:40 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:46:41 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:46:41 geder gnome-shell[6176]: Removing a network device that was not added | |
Jun 05 01:47:41 geder gnome-shell[6176]: Removing a network device that was not added |
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
// Paste into <https://turf-sandbox.netlify.app/> | |
function sampleLine(inputLine, distanceMeters) { | |
let inputLength = turf.length(inputLine, "m") | |
let samples = [] | |
for (let i = 0; i < Math.floor(inputLength); i+=distanceMeters) { | |
let point = turf.along(inputLine, i, 'm') | |
samples.push(point["geometry"]["coordinates"]) | |
} | |
samples.push(inputLine["geometry"]["coordinates"].at(-1)) |
OlderNewer