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
#!/bin/bash | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir -p procon | |
cd procon | |
echo 0x057e > idVendor | |
echo 0x2009 > idProduct | |
echo 0x0200 > bcdDevice | |
echo 0x0200 > bcdUSB | |
echo 0x00 > bDeviceClass |
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 typing import List | |
from typing import Tuple | |
from typing import Type | |
def f(x: Type) -> None: | |
... | |
# error: Argument 1 to "f" has incompatible type "object"; expected "Type[Any]" |
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 __future__ import annotations | |
from typing import Any | |
from typing import Dict | |
from typing import Optional | |
from typing import Sequence | |
from typing import Tuple | |
from typing import IO | |
from typing_extensions import Literal | |
from typing_extensions import Protocol |
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 __future__ import annotations | |
from typing_extensions import Final | |
from dataclasses import dataclass | |
@dataclass | |
class A: | |
x: Final[int] = 100 |
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
#!/usr/bin/env python3 | |
from __future__ import annotations | |
class Foo: | |
class __Internal: | |
pass | |
def __init__(self, _: Type[__Internal]) -> None: | |
pass |
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
#!/usr/bin/env python3 | |
from typing import NamedTuple | |
import typedjson | |
class NameJson(NamedTuple): | |
first: str | |
last: str |
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 UIKit | |
import RxSwift | |
import RxCocoa | |
public enum Keyboard: ReactiveCompatible { | |
public struct Update { | |
public let size: CGSize | |
public let duration: Double | |
} |
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 UIKit | |
import RxCocoa | |
import RxSwift | |
final class TabBarController: UITabBarController { | |
private let disposeBag = DisposeBag() | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
format_version: 1.4.0 | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
workflows: | |
deploy: | |
after_run: | |
- ensure_clean | |
- test | |
- lint_spec | |
- push_spec | |
build: |
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
#!/bin/bash | |
validate_variable() { | |
name=$1 | |
value=${!name} | |
if [ -z "$value" ]; then | |
echo "error: \$${name} is required." >&2 | |
exit 128 | |
fi |
NewerOlder