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
| { | |
| "Inspect a value": { | |
| "prefix": "ins", | |
| "description": "Inspect a value with a label", | |
| "body": [ | |
| "IO.inspect($1, label: \"$1\")" | |
| ] | |
| }, | |
| "Pipe inspect": { | |
| "prefix": "insp", |
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 "std/collections" import {List}; | |
| from "std/os" import {File}; | |
| export enum Result<SuccessType, ErrorType> { | |
| Success(SuccessType), | |
| Error(ErrorType), | |
| } | |
| export enum Maybe<T> { | |
| Some(T), |
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 MovEx.BufferedReader do | |
| @moduledoc false | |
| @enforce_keys ~w(source buffer chunk_size)a | |
| defstruct ~w(source buffer chunk_size)a | |
| @type t() :: %__MODULE__{ | |
| source: Stream.t(), | |
| buffer: binary(), |
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
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| "os" | |
| "slices" | |
| "strconv" | |
| "strings" | |
| ) |
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
| List<FoundMatch> findMatches(List<List<String>> lines, String wordToFind) { | |
| final foundMatches = <FoundMatch>[]; | |
| for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) { | |
| final row = lines[lineIndex]; | |
| for (var columnIndex = 0; columnIndex < row.length; columnIndex++) { | |
| final currentCharacter = lines[lineIndex][columnIndex]; | |
| if (currentCharacter != wordToFind[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
| final semanticVersionRegex = RegExp( | |
| r'^' | |
| r'(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)' | |
| r'(?:-(?<preRelease>(?:[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)))?' | |
| r'(?:\+(?<build>(?:[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)))?' | |
| r'$', | |
| ); | |
| /// Tries to parse the given [input] into a [SemanticVersion]. | |
| /// |
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
| { | |
| "Inspect a value": { | |
| "prefix": "ins", | |
| "description": "Inspect a value with a label", | |
| "body": [ | |
| "IO.inspect($1, label: \"$1\")" | |
| ] | |
| }, | |
| "Pipe inspect": { | |
| "prefix": "insp", |
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 Utils do | |
| @moduledoc """ | |
| ## Usage | |
| Could be imported in <project>/lib/my_app_web.ex for general access. | |
| For example in controller/0 | |
| ```elixir | |
| import Utils |
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
| @doc """ | |
| Builds an authorization URL which should be visited by users in order to connect Twitch to your application. | |
| Reference: https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#implicit-grant-flow | |
| """ | |
| @spec build_authorization_url( | |
| client_id :: String.t(), | |
| redirect_uri :: String.t(), | |
| scopes :: list(Scope.t()) | |
| ) :: String.t() |
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
| extends Light2D | |
| @export | |
| var one_cycle_in_milliseconds = 1500 | |
| @export var min_alpha_number = 0 | |
| @export var max_alpha_number = 1 | |
| var intermediate_value = 0 |
NewerOlder