Key | Action |
---|---|
Ctrl-W |
Close tab |
Ctrl-B |
Declaration or usages |
Ctrl-D |
Add selection for next occurrence |
F2 |
Rename |
F5 |
Run |
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
my-job: | |
parallel: | |
matrix: | |
- OWLS: 1 | |
CATS: 0 | |
- OWLS: 0 | |
CATS: 1 | |
script: | |
- echo OWLS=$OWLS | |
- echo CATS=$CATS |
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
#replace "<PAT TOKEN>" with your github PAT token, tested with "Update ALL user data" PAT token. | |
curl -q https://rms-support-letter.github.io/ | grep "<li>" | grep "github.com" | grep -v "\[" | awk -F "https://github.com/" '{ print $2 }' | awk -F "\"\>" '{ print $1 }' | sed 's/\///g' | sed '/^$/d' | xargs -I USER curl -i -X PUT -H "Authorization: token <PAT token>" -H "Accept: application/vnd.github.v3+json" https://api.github.com/user/blocks/USER |
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
#!/usr/bin/env bash | |
set -e | |
function core_resources() { | |
http "http://127.0.0.1:8001/api/v1" | jq -r '.resources[].name' | |
} | |
function group_versions() { | |
http GET "http://127.0.0.1:8001/apis" | jq -r '.groups[].preferredVersion.groupVersion' |
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 yaml | |
import pathlib | |
print(yaml.load(pathlib.Path("apply.yaml").read_text())) |
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
class Chain: | |
def __init__(self): | |
self.functions = [] | |
def and_then(self, func): | |
self.functions.append(func) | |
return self | |
def __call__(self, value): | |
result = value |
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 path | |
import json | |
import attr | |
import cattr | |
@attr.s() | |
class Config: | |
foo: int = attr.ib() | |
bar: str = attr.ib() | |
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 main(ctx: click.Context, dev: bool, next: bool): | |
config_file = 'odyssey.json' | |
log_file = 'odyssey.log' | |
if next: | |
config_file = 'odyssey-next.json' | |
log_file = 'odyssey-next.log' | |
if not dev: | |
config_file = os.path.join('/etc/gb/marrs/', config_file) |
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
class TimePeriod | |
attr_accessor :seconds | |
def hours | |
seconds / 3600 | |
end | |
def hours=(value) | |
seconds = value * 3600 | |
hours |
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
module ExampleModule | |
def hello | |
puts 'hello world' | |
end | |
end | |
class ExampleClass | |
include ExampleModule | |
end |
NewerOlder