Before starting, ensure you have the necessary build tools installed. Slackware 15 includes most of these by default if you did a full installation. Verify the following are present:
gccandg++makebcflex
| import requests | |
| import json | |
| from collections import defaultdict | |
| from datetime import datetime | |
| def get_team_schedule(team_abbrev, season): | |
| """ | |
| Get all games for a team in a season | |
| Args: |
| import requests | |
| import json | |
| def get_shootout_results(game_id): | |
| """ | |
| Fetch and parse shootout results from NHL API | |
| Args: | |
| game_id: NHL game ID (e.g., 2025020485) | |
| # cat /usr/lib/systemd/system-sleep/nm-suspend.sh | |
| #!/bin/bash | |
| case $1 in | |
| pre) | |
| nmcli radio wifi off | |
| ;; | |
| post) | |
| nmcli radio wifi on | |
| ;; | |
| esac |
| #!/usr/bin/env python3 """ mockup language engine for plugins """ | |
| import json | |
| js = '{"name":"command_name", "prompt": [{"question": "where do you want to ping", "var": "dest"},{"question": "ping from", "var": "src"}], "handler": "some_function", "query": "ping $dest from $src"}' | |
| j = json.loads(js) | |
| def some_function(j): | |
| print(f"command: {j['name']}") | |
| answer = {} | |
| for q in j['prompt']: |
| #!/usr/bin/env python3 | |
| class command(object): | |
| def ratelimit(*args, **kwargs): | |
| limit = args[0] | |
| def ratelimit_wrapper(func): | |
| print(f"rate: {limit}") | |
| print("begin: ratelimit_wrapper") | |
| # some stuff | |
| print("end: ratelimit_wrapper") |
| class Alpha(Cosmos): | |
| def __init__(self): | |
| self.name = "Alpha.class" |
| { | |
| "agent": { | |
| "run_as_user": "cwagent" | |
| }, | |
| "metrics": { | |
| "metrics_collected": { | |
| "procstat": { | |
| "pattern": "/usr/bin/java -jar report-service.jar", | |
| "measurement": [ | |
| "pid_count" |
| - hosts: all | |
| tasks: | |
| - name: Installing git | |
| become: true | |
| become_user: root | |
| yum: | |
| name: git | |
| state: latest |
| function JsonSettings() | |
| set expandtab | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| endfunction | |
| :command Json :call JsonSettings() |