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
func main() { | |
f, err := tea.LogToFile("cm.log", "debug") | |
if err != nil { | |
log.Fatalf("err %w", err) | |
} | |
defer f.Close() | |
app := tea.NewProgram(model{}, tea.WithAltScreen()) | |
if _, err := app.Run(); err != nil { |
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
# Fetch the latest Bicep CLI binary | |
curl -Lo bicep.bin https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 | |
# Mark it as executable | |
chmod +x ./bicep.bin | |
# Add bicep to your PATH (requires admin) | |
sudo mv ./bicep.bin /usr/local/bin/bicep | |
# Verify you can now access the 'bicep' command | |
bicep --help | |
# Done! | |
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
type MyOption struct { | |
options []huh.Option[string] | |
} | |
func (o *MyOption) Options(options ...huh.Option[string]) { | |
o.options = options | |
} | |
var BurgerList = []string{"Charmburger Classic", "Chickwich", "Fishburger", "Charmpossible™ Burger"} |
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 hydra | |
import typer | |
@hydra.main(config_path='config.yaml') | |
def my_cli(config): | |
# Use Typer to define the individual commands and subcommands that your application accepts | |
@typer.command() | |
def command1(arg1: str, arg2: int): | |
# Do something with the arg1 and arg2 arguments | |
print(arg1, arg2) |
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 ansible_runner | |
class AnsiblePlaybookRunner: | |
def __init__(self, playbook_path, inventory_path=None, options=None, private_data_dir=None): | |
self.playbook_path = playbook_path | |
self.inventory_path = inventory_path | |
self.options = options or {} | |
self.private_data_dir = private_data_dir | |
def run(self): |
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 pytest | |
from ansible.module_utils.basic import AnsibleModule | |
from my_plugin import main | |
@pytest.fixture | |
def fake_module(): | |
module = ansibleModule( | |
argument_spec=dict( | |
name=dict(type='str'), | |
age=dict(type='int') |
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
primework.ch. 3600 IN TXT "amazonses:Bv9+2PusiAspWUN1jZMytRxfNcRuG0bDYW0lOp+4geM=" | |
primework.ch. 3600 IN TXT "MS=ms23898367" | |
primework.ch. 3600 IN TXT "v=spf1 include:spf.protection.outlook.com -all ip4:83.150.7.66 ip4:213.188.32.155 ip4:185.49.220.130 ip4:10.60.210.114 include:realisator.ch -all" | |
primework.ch. 3600 IN MX 0 primework-ch.mail.protection.outlook.com. | |
primework.ch. 3600 IN A 18.184.147.253 | |
autodiscover.primework.ch. 3600 IN CNAME autodiscover.outlook.com. | |
sip.primework.ch. 3600 IN CNAME sipdir.online.lync.com. |
NewerOlder