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 Cms.ContentBlock do | |
| @moduledoc false | |
| use Ecto.Schema | |
| import Ecto.Changeset | |
| alias Cms.Blocks.TextBlock | |
| @supported_block_types [ |
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 AdventOfCode2023.Day04 do | |
| @moduledoc false | |
| require IEx | |
| require Logger | |
| def run do | |
| input = | |
| "lib/advent_of_code2023/inputs/04/part1.txt" | |
| |> File.read!() |
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
| type ChannelSpecificCallback = (heartbeat: number) => void | Promise<void>; | |
| type GeneralCallback = ( | |
| channel: string, | |
| heartbeat: number, | |
| ) => void | Promise<void>; | |
| /** | |
| * An interface for describing the options which are needed by the HypeRateWebsocket | |
| * |
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 AdventOfCode2023.Day02 do | |
| require Logger | |
| def run() do | |
| input = | |
| File.read!("lib/advent_of_code2023/inputs/02/part1.txt") | |
| |> String.trim() | |
| |> String.split("\n", trim: true) | |
| part1(input) |
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 AdventOfCode2023.Day01 do | |
| def run() do | |
| part1() | |
| part2() | |
| end | |
| defp part1() do | |
| File.read!("lib/advent_of_code2023/inputs/01/part1.txt") | |
| |> String.trim() | |
| |> String.split("\n", trim: 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
| #ifdef WIN32 | |
| #include <windows.h> | |
| #else | |
| #include <stdio.h> | |
| #include <sys/ioctl.h> | |
| #include <unistd.h> | |
| #endif | |
| class Console { | |
| public: |
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
| import { TokenType } from "./TokenType"; | |
| import { Keyword } from "./Keywords"; | |
| import { SpecialCharacters } from "./SpecialCharacters"; | |
| import { type Token } from "./Token"; | |
| export type ExpectedToken = | |
| | [TokenType.Identifier] | |
| | [TokenType.String] | |
| | [TokenType.Char] | |
| | [TokenType.Number] |
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
Show hidden characters
| { | |
| // Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
| // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
| // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
| // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
| // Placeholders with the same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "scope": "javascript,typescript", |
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
| document.querySelectorAll(".fake-button").forEach((element) => | |
| element.addEventListener("click", () => { | |
| document.querySelector(element.dataset["target"]).classList.toggle("active"); | |
| }) | |
| ); |
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
| "Remap keys for applying codeAction to the current line. | |
| nmap <a-cr> <Plug>(coc-codeaction) | |
| "Apply AutoFix to problem on the current line. | |
| nmap <leader>qf <Plug>(coc-fix-current) |