{"id":23248346,"url":"https://github.com/brkn/scripts","last_synced_at":"2025-04-06T01:15:56.024Z","repository":{"id":264166488,"uuid":"892564294","full_name":"brkn/scripts","owner":"brkn","description":"Dumb scripts I've created over the last couple of years","archived":false,"fork":false,"pushed_at":"2024-12-04T14:47:32.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T04:04:07.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brkn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T10:58:25.000Z","updated_at":"2024-12-04T14:49:50.000Z","dependencies_parsed_at":"2024-11-22T12:17:58.741Z","dependency_job_id":"5903673b-9f9d-43e4-b81e-e2e3d4f54a15","html_url":"https://github.com/brkn/scripts","commit_stats":null,"previous_names":["brkn/scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brkn%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brkn%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brkn%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brkn%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brkn","download_url":"https://codeload.github.com/brkn/scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419863,"owners_count":20936014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T08:13:32.652Z","updated_at":"2025-04-06T01:15:55.990Z","avatar_url":"https://github.com/brkn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scripts\n\nDumb cute little scripts I've created over the last couple of years.\n\n- [copper](#copper) - Fix RuboCop violations automatically\n- [firefox-history-analysis](#firefox-history-analysis) - Analyze Firefox browsing habits\n- [pomodoro](#pomodoro) - Timer for focused work sessions\n- [self-control](#self-control) - Block distracting websites\n- [zeitwerk-check](#zeitwerk-check) - Run Zeitwerk checks on Rails 6 projects\n- [files-sorted-by-last-commit](#files-sorted-by-last-commit) - List files by last commit date\n- [git-dirs-exec](#git-dirs-exec) - Run a command in each direct subfolder git repo\n\n### copper\n\nRuby script that automates fixing RuboCop violations:\n\n- Reads `.rubocop_todo.yml`, auto-fixes violations one by one, then creates commits/branches for each fix.\n- **Requirements:** [Ruby](#elixir-ruby), RuboCop, git\n- **Usage:** Run `copper [max_number_of_commits]` in a Ruby project with a `.rubocop_todo.yml` file.\n\n### firefox-history-analysis\n\nElixir script that shows your Firefox browsing habits:\n\n- Shows most visited sites in a graphic chart and allows you to export it as CSV.\n- **Requirements:** [Elixir](#elixir-ruby), Firefox browser, [Livebook](#livebook)\n- **Usage:** Open `firefox-history-analysis.livemd` in Livebook and run cells to analyze your Firefox history.\n\n### pomodoro\n\nShell script for running pomodoro:\n\n- Runs a timer for focused work. Blocks distracting sites during work. Logs work sessions to daily notes. Plays sound when time's up.\n- Note: This script relies on `self-control` script. Comment out that line if you don't want to use it.\n- **Requirements:** [timer](#timer), [self-control](#self-control)\n- **Usage:** Run `pomodoro \u003cduration\u003e \"\u003ctask_name\u003e\"` to start a focused work session.\n\n### self-control\n\nRuby script to block distracting websites:\n\n- Blocks sites by categories (games, social, video). Edit the hardcoded hash of sites for your liking.\n- **Requirements:** [Ruby](#elixir-ruby), [SelfControl.app](#self-control-app)\n- **Usage:** Run `self-control \u003cduration\u003e [category...]` to block sites (e.g., `./scripts/self-control 1h social video`).\n\n### zeitwerk-check\n\nAt the time of writing I was working with bunch of ruby ~6 apps, maybe this would work with newer versions too? Try it,\nlet me know. Bash script that runs Zeitwerk checks on Rails 6 projects:\n\n- Finds all Rails 6 projects in subdirectories, then runs `zeitwerk:check` on each, then shows colored output for pass/fail.\n- **Requirements:** [fd](#fd), [ag](#ag), Ruby on Rails 6 apps that you want to fix. Needs to be called at your `repos/` folder or wherever your folder is for all the repos.\n- **Usage:** Run `zeitwerk-check` in a directory containing Rails projects.\n\n### git-dirs-exec\n\nBash script to run a command in each direct subfolder git repo:\n\n- Finds git repositories up to 2 levels deep and runs given command in each.\n- **Usage:** Run `git-dirs-exec \u003ccommand\u003e` to execute command in all git repos.\n\n### files-sorted-by-last-commit\n\nRuby script to sort files by their last commit date:\n\n- Lists all Ruby files in git repo sorted by last commit date.\n- **Requirements:** [Ruby](#elixir-ruby)\n- **Usage example:** Only list most recent ten: `files-sorted-by-last-commit | head -n10`\n\n\n## Setup\n\n1. Clone the repo\n2. Add repo root to your PATH or use scripts with `./scripts/script-name`\n3. Make scripts executable: `chmod +x ./scripts/script-name`\n4. Install requirements for scripts you want to use\n\n## Referenced Tools\n\n### Self Control App\n\n- [Website](https://selfcontrolapp.com/)\n- [Source](https://github.com/SelfControlApp/selfcontrol)\n- Install: `brew install selfcontrol`\n\n### Timer\n\n- Install: `brew install timer`\n\n### RuboCop\n\n- [Website](https://rubocop.org/)\n- Install: Add to your Gemfile or `gem install rubocop`\n\n### Livebook\n\n- [Website](https://livebook.dev/)\n- Install: `brew install livebook`\n\n### fd\n\n- [Source](https://github.com/sharkdp/fd)\n- Install: `brew install fd`\n\n### ag\n\n- [Source](https://github.com/ggreer/the_silver_searcher)\n- Install: `brew install ag`\n\n### Elixir, Ruby\n\nThese are languages. If you don't care about the version managing, you can install them like this:\n- `brew install ruby`\n- `brew install erlang elixir`\n\nBut ideally you should know these languages. These scripts won't be much use to you if you don't know how to work with them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrkn%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrkn%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrkn%2Fscripts/lists"}