powerful-connection

powerful-connection command that checks our computer's power, battery, load, wifi, ssid, etc.

https://github.com/sixarm/powerful-connection

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

powerful-connection command that checks our computer's power, battery, load, wifi, ssid, etc.

Basic Info
  • Host: GitHub
  • Owner: SixArm
  • Language: Shell
  • Default Branch: main
  • Size: 26.4 KB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 8 years ago · Last pushed 11 months ago
Metadata Files
Readme Code of conduct Citation Codeowners

README.md

powerful-connection

This macOS script determines if we have a "powerful connection".

The phrase "powerful connection" is our nickname for when our laptop is fully powered up, and has a good wireless connection suitable for significant networking, such as downloading big files or streaming data.

Details

This script runs these checks:

  • The computer is running on AC power.
  • The battery is fully charged.
  • The CPU has available processing cycles.
  • The WiFi is working and is connected to a SSID.
  • The SSID accept list succeeds.
  • The SSID reject list succeeds.

Ideas

We use this script for optionally running large network jobs. For example, we use a daily job that checks for a powerful connection, and if so, then the job downloads any available software updates.

We use this script as a way to check if we should run streaming. For example, we use this script to do a check when a user signs in: if the user has a powerful connection, then we launch video streaming.

Exit codes

  • 0: success
  • 2x: power issue
  • 20: computer power is not plugged in
  • 21: battery power is not fully charged
  • 22: processing power is not sufficient
  • 3x: connection issue
  • 30: ssid unavailable
  • 31: ssid accept list exists, and ssid is not in it
  • 32: ssid reject list exists, and ssid is in in

Configuration

Create these files:

~/.config/powerful-connecton/blacklist.txt
~/.config/powerful-connecton/whitelist.txt

Add any SSID names that you want to either list.

Add each SSID name on its own line.

Cron

We like using the cron command to schedule recurring jobs. For example, each night we check if we have powerful wifi, and if so, then we upgrade our system software and apps.

Example crontab lines:

0 0 * * * powerful-connection && nice softwareupdate --install --all
0 1 * * * powerful-connection && nice brew upgrade --cleanup
0 2 * * * powerful-connection && nice npm update -g

Details:

  • We use the nice command to run the job at lower priority.

  • We use the softwareupdate command to update macOS.

  • We use the brew command to manage many of our software tools.

  • We use the npm command for node package management.

References

This script is related to these repositories:

  • https://github.com/sixarm/airport-ssid
  • https://github.com/sixarm/hostinfo-commands
  • https://github.com/sixarm/pmset-commands
  • https://github.com/sixarm/ssid-powerful
  • https://github.com/sixarm/sysctl-commands
  • https://github.com/updatecommand/update

Disclaimers

  • This script is suitable for demonstration purposes.
  • There is no warranty, express or implied.
  • Use at your own risk.
  • Your mileage may vary.

Tracking

  • Command: powerful-connection
  • Version: 2.0.0
  • Created: 2015-07-01
  • Updated: 2023-11-25T01:22:49Z
  • License: GPL-2.0 or GPL-3.0 or contact for custom
  • Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)

Owner

  • Name: SixArm
  • Login: SixArm
  • Kind: organization
  • Email: sixarm@sixarm.com
  • Location: San Francisco

SixArm Software

Citation (CITATION.cff)

cff-version: 1.2.0
title: powerful-connection
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/SixArm/powerful-connection/'
    description: powerful-connection
repository-code: 'https://github.com/SixArm/powerful-connection/'
abstract: >-
  powerful-connection
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 18
  • Total Committers: 1
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 18
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels