This file contains 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
curl --include \ | |
--request POST \ | |
--header "Content-Type: application/json" \ | |
--header "X-Auth-Token: INSERT_TOKEN" \ | |
--header "Cookie: asdsadsafasasdasd" \ | |
--data-binary "{ | |
\"fromLocation\": \"BUD\", | |
\"toLocation\": \"LON\", | |
\"departureDate\": \"2014-05-15T00:00:00\", | |
\"returnDate\": \"2014-05-20T00:00:00\", |
This file contains 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 PowAssent.Phoenix.ViewHelpers do | |
@moduledoc """ | |
View helpers to render authorization links. | |
""" | |
alias PowAssent.Plug | |
alias PowAssent.Phoenix.AuthorizationController | |
alias Phoenix.{HTML, HTML.Link} | |
import Logger |
This file contains 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 WildeWeb.MagicLinkController do | |
use WildeWeb, :controller | |
alias Pow.Plug | |
require Logger | |
plug :put_layout, "auth.html" | |
plug :put_layout, "simple.html" when action in [:setup] | |
def send(conn, params) do | |
Wilde.Auth.MagicLinks.deliver_magic_link(params["email"], params["request_path"]) |
This file contains 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
ApolloService.shared.client.store.withinReadWriteTransaction({ transaction in | |
let deletedDroidId = "..." | |
// | |
// Update the Query | |
// | |
let query = DroidListQuery() | |
// Update Cache for a Query on a deletion | |
try transaction.update(query: query) { (data: inout DroidListQuery.Data) in |
This file contains 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
#include <Wire.h> | |
void setup() { | |
Serial.begin(115200); // Start serial communication at 115200 baud rate | |
while (!Serial); // Wait for serial port to connect | |
Serial.println("\nI2C Scanner"); | |
Wire.begin(); // Initialize I2C communication | |
} | |
void loop() { |
This file contains 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
/* | |
RV-3028-C7 Set Date Time Example | |
Configures date and time to the RTC module via the serial console, and then | |
prints the current date and time in ISO 8601 format every second. | |
Copyright (c) 2020 Macro Yau | |
https://github.com/MacroYau/RV-3028-C7-Arduino-Library | |
*/ |
This file contains 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
#include "Adafruit_TinyUSB.h" | |
#include <SPI.h> | |
// Define your custom SPI pins | |
// UM Feather WORKING | |
// #define MY_MOSI_PIN 35 | |
// #define MY_MISO_PIN 37 | |
// #define MY_CLK_PIN 36 | |
// #define MY_CS_PIN 38 | |
// #define MY_INT_PIN 33 |
This file contains 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
#include <esp_sleep.h> | |
// Define the pin connected to the V_USB signal | |
#define WAKEUP_PIN GPIO_NUM_19 | |
void printWakeupReason() { | |
esp_sleep_wakeup_cause_t wakeup_reason = esp_sleep_get_wakeup_cause(); | |
switch (wakeup_reason) { | |
case ESP_SLEEP_WAKEUP_EXT0: |