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. |
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 android.util; | |
public class Log { | |
public static int v(String tag, String msg) { | |
print("VERBOSE", tag, msg); | |
return 0; | |
} | |
public static int d(String tag, String msg) { |
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
/* | |
AWX Workflow extra_data tooltips | |
This script adds a blue circle on each node, with a hover tooltip containing the node's extra_data. | |
It grabs each workflow node's extra_data from the angular component scope. | |
*/ | |
(function () { | |
const workflowChart = document.querySelector('#aw-workflow-chart-g'); | |
if (!workflowChart) return; | |
const scope = angular.element(workflowChart).scope(); | |
if (!scope) return; |
NewerOlder