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
:global cfu do={\ | |
:local cfzoneid "<zone ID>";\ | |
:local cfrecordid "<zone record ID>";\ | |
:local cfdomain "<A record name>";\ | |
:local cftoken "<cloudflare API token>";\ | |
:local cfip [/ip cloud get public-address];\ | |
:local cfproxied true;\ | |
:local date [/system clock get date];\ | |
:local time [/system clock get time];\ | |
:local cfcomment "Updated by Mikrotik Cloudflare DDNS Script at $date $time";\ |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/docker/cli/cli/connhelper" | |
"github.com/docker/docker/api/types" | |
"github.com/docker/docker/client" | |
"net/http" | |
"os" |
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
import React from 'react'; | |
import { Flex } from '@chakra-ui/react'; | |
import { PlayingCard, ALL_RANKS, ALL_SUITS } from './PlayingCard'; | |
export function AllCards() { | |
return ( | |
<Flex flexWrap="wrap" gap={5} mt={20} padding={10}> | |
{ALL_RANKS.map((rank) => | |
ALL_SUITS.map((suit, idx) => ( | |
<PlayingCard key={idx} suit={suit} rank={rank} width="22%" minWidth="200px" /> |
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
import React from 'react'; | |
import { IconBaseProps } from 'react-icons'; | |
import { | |
GiCardAceDiamonds, | |
GiCard2Diamonds, | |
GiCard3Diamonds, | |
GiCard4Diamonds, | |
GiCard5Diamonds, | |
GiCard6Diamonds, | |
GiCard7Diamonds, |
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
package me.nathanjohnson | |
import android.util.Log | |
import kotlin.reflect.KClass | |
/** | |
* Transition from one state to another on a specific event. | |
*/ | |
data class StateTransition<StateT, ResourceT>( |
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
import subprocess | |
import json | |
from json.decoder import JSONDecodeError | |
import subprocess | |
from typing import Union, Any | |
from termcolor import colored | |
import shlex | |
def run_pwsh( |
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
def run_cmd_tty_stream(cmd, bytes_input=b''): | |
"""Streams the output of cmd with bytes_input to stdin, | |
with stdin, stdout and stderr as TTYs. | |
Each yield from this function is a tuple of (stream name [str], data [bytes]) | |
Adapted from https://stackoverflow.com/a/52954716/507629 | |
and https://gist.github.com/hayd/4f46a68fc697ba8888a7b517a414583e | |
""" | |
# provide tty to enable line-buffering |
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
import subprocess | |
import json | |
from json.decoder import JSONDecodeError | |
import errno | |
import os | |
import pty | |
import select | |
import subprocess | |
import re | |
from typing import Tuple, Any, Union |
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
:root { | |
--header-bg: #0f2413; | |
--header-foreground: #fff; /* #20bf20 */ | |
--primary-color: #118311; | |
--primary-color-dark: #107010; | |
--primary-color-light: #118311; | |
} | |
#c-header { | |
background: var(--header-bg); |
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
This bookmarklet will autofill all the survey fields in an AWX Launch Job Prompt in one click. It gets the values from the extra vars which are much easier to paste or edit. | |
Just add the `javascript:...` code as the URL in a bookmark. |
NewerOlder