Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis kahoro authored Sep 5, 2023
2 parents ddef4af + 8da2deb commit 6daae84
Show file tree
Hide file tree
Showing 17 changed files with 298 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- name: Check typos
uses: crate-ci/typos@master

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -34,10 +37,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: -- -A warnings

- name: Run clippy on tests
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
args: --tests -- -A warnings
48 changes: 48 additions & 0 deletions specs/elasticsearch/elasticsearch-cluster-health.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# The name of the workflow.
name: Show the Elasticsearch cluster health
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
command: |-
curl -XGET '{{schema}}://{{host}}:{{port}}/_cat/health?v={{verbose}}'
# Any tags that the workflow should be categorized with.
tags:
- elasticsearch
- curl
# A description of the workflow.
description: Inspect the Elasticsearch cluster health
# List of arguments within the command.
arguments:
# Name of the argument within the command. This must exactly match the name of the argument
# within the command (without the curly braces).
- name: schema
# The description of the argument.
description: The url schema
# The default value for the argument.
default_value: http
# within the command (without the curly braces).
- name: host
# The description of the argument.
description: The url hostname
# The default value for the argument.
default_value: localhost
# within the command (without the curly braces).
- name: port
# The description of the argument.
description: The url port
# The default value for the argument.
default_value: 9200
# within the command (without the curly braces).
- name: verbose
# The description of the argument.
description: Should the output be verbose
# The default value for the argument.
default_value: true
# The source URL for where the workflow was generated from, if any.
source_url: "https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html"
# The author of the workflow.
author: Olaf Klejnstrup-Jensen
# The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page.
author_url: "https://github.com/fului"
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
# See FORMAT.md for the full list of accepted values.
shells: []
51 changes: 51 additions & 0 deletions specs/elasticsearch/elasticsearch-count-index-documents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# The name of the workflow.
name: Count documents in an index in Elasticsearch
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
command: |-
curl -XGET '{{schema}}://{{host}}:{{port}}/_cat/count/{{index_name}}?v={{verbose}}'
# Any tags that the workflow should be categorized with.
tags:
- elasticsearch
- curl
# A description of the workflow.
description: Show the document count for an index in Elasticsearch
# List of arguments within the command.
arguments:
# Name of the argument within the command. This must exactly match the name of the argument
# within the command (without the curly braces).
- name: schema
# The description of the argument.
description: The url schema
# The default value for the argument.
default_value: http
# within the command (without the curly braces).
- name: host
# The description of the argument.
description: The url hostname
# The default value for the argument.
default_value: localhost
# within the command (without the curly braces).
- name: port
# The description of the argument.
description: The url port
# The default value for the argument.
default_value: 9200
# within the command (without the curly braces).
- name: index_name
# The description of the argument.
description: The name of the index you want the count for
- name: verbose
# The description of the argument.
description: Should the output be verbose
# The default value for the argument.
default_value: true
# The source URL for where the workflow was generated from, if any.
source_url: "https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html"
# The author of the workflow.
author: Olaf Klejnstrup-Jensen
# The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page.
author_url: "https://github.com/fului"
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
# See FORMAT.md for the full list of accepted values.
shells: []
47 changes: 47 additions & 0 deletions specs/elasticsearch/elasticsearch-list-indices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# The name of the workflow.
name: List indices in Elasticsearch
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
command: |-
curl -XGET '{{schema}}://{{host}}:{{port}}/_cat/indices?v={{verbose}}&s=index'
# Any tags that the workflow should be categorized with.
tags:
- elasticsearch
- curl
# A description of the workflow.
description: This lists indices in Elasticsearch
# List of arguments within the command.
arguments:
# Name of the argument within the command. This must exactly match the name of the argument
# within the command (without the curly braces).
- name: schema
# The description of the argument.
description: The url schema
# The default value for the argument.
default_value: http
# within the command (without the curly braces).
- name: host
# The description of the argument.
description: The url hostname
# The default value for the argument.
default_value: localhost
# within the command (without the curly braces).
- name: port
# The description of the argument.
description: The url port
# The default value for the argument.
default_value: 9200
- name: verbose
# The description of the argument.
description: Should the output be verbose
# The default value for the argument.
default_value: true
# The source URL for where the workflow was generated from, if any.
source_url: "https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html"
# The author of the workflow.
author: Olaf Klejnstrup-Jensen
# The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page.
author_url: "https://github.com/fului"
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
# See FORMAT.md for the full list of accepted values.
shells: []
2 changes: 1 addition & 1 deletion specs/laravel/laravel_migrate_fresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ command: |-
tags:
- Laravel
- Php
description: This command will drop all excisting tables and run Laravel database migrations after that
description: This command will drop all existing tables and run Laravel database migrations after that
arguments: []
source_url: "https://laravel.com/docs/10.x/migrations#running-migrations"
author: Bert De Swaef
Expand Down
2 changes: 1 addition & 1 deletion specs/laravel/laravel_migrate_fresh_seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ command: |-
tags:
- Laravel
- Php
description: This command will drop all excisting tables and run Laravel database migrations after that, with seeding the database at the end.
description: This command will drop all existing tables and run Laravel database migrations after that, with seeding the database at the end.
arguments: []
source_url: "https://laravel.com/docs/10.x/migrations#running-migrations"
author: Bert De Swaef
Expand Down
16 changes: 16 additions & 0 deletions specs/macOS/spotlight-indexing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Starts or stops the MacOS Spotlight indexing process mds_stores.
command: |-
sudo mdutil -a -i {{switch}}
tags:
- MacOS
- mds_stores
description: mds_stores is a CPU intensive process that runs for Spotlight indexing. This command will enable or disable that process.
arguments:
- name: switch
description: can be set to on or off.
default_value: off
source_url: "https://electrictoolbox.com/disable-spotlight-indexing-mac-osx/"
author: The Electric Toolbox
author_url: "https://electrictoolbox.com/contact/"
shells: []
29 changes: 29 additions & 0 deletions specs/macos/mac_mouse_acceleration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# The name of the workflow.
name: MacOS 13+ - Disable/Enabled mouse acceleration
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
command: |-
echo "old value:"
defaults read -g com.apple.mouse.scaling
defaults write -g com.apple.mouse.scaling -integer {{acceleration_amount}}
# Any tags that the workflow should be categorized with.
tags:
- MacOS
# A description of the workflow.
description: Update mouse acceleration built into MacOS. Returns -1 when disabled. For MacOS 13+
# List of arguments within the command.
arguments:
# Name of the argument within the command. This must exactly match the name of the argument
# within the command (without the curly braces).
- name: acceleration_amount
# The description of the argument.
description: (-1) = disabled, (0-3) = enabled, amount of acceleration
# The default value for the argument.
default_value: -1
# The source URL for where the workflow was generated from, if any.
source_url: "https://productivityspot.com/how-to-turn-off-mac-mouse-acceleration/"
# The author of the workflow.
author: mikikiv
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
# See FORMAT.md for the full list of accepted values.
shells: []
14 changes: 14 additions & 0 deletions specs/pnpm/find_version_of_an_installed_pnpm_package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Find version of an installed pnpm package
command: "pnpm list {{package_name}}"
tags:
- pnpm
description: "Lists the version name of an installed package. To see the versions of all installed packages, run `pnpm list` without passing a package name."
arguments:
- name: package_name
description: The name of the package
default_value: ~
source_url: "https://pnpm.io/6.x/cli/list"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
11 changes: 11 additions & 0 deletions specs/pnpm/list_all_globally_installed_pnpm_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: List all globally installed PNPM packages
command: pnpm ls --depth 0
tags:
- pnpm
description: "Lists all globally installed PNPM packages, avoiding including any package's dependencies in the view."
arguments: []
source_url: "https://pnpm.io/6.x/cli/list#--depth-number"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
11 changes: 11 additions & 0 deletions specs/pnpm/reinstall_all_pnpm_dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Reinstall all PNPM dependencies
command: rm -rf node_modules && pnpm install
tags:
- pnpm
description: Reinstalls all dependencies by removing the node_modules folder and then reinstalling.
arguments: []
source_url: "https://pnpm.io/cli/install"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
11 changes: 11 additions & 0 deletions specs/pnpm/remove_all_global_pnpm_modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Remove all global pnpm modules
command: "rm -rf ~/.pnpm-store"
tags:
- pnpm
description: "Removes all global pnpm modules by removing the `~/.pnpm-store` folder."
arguments: []
source_url: "https://pnpm.io/6.x/uninstall"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
14 changes: 14 additions & 0 deletions specs/pnpm/uninstall_a_local_pnpm_package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Uninstall a local PNPM package
command: "pnpm uninstall {{name}}"
tags:
- pnpm
description: "Removes a module from `node_modules` and from `package.json`."
arguments:
- name: name
description: The name of the package to uninstall
default_value: ~
source_url: "https://pnpm.io/cli/remove"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Update each dependency in package.json to the latest version (PNPM)
command: "npm config --global set strict-peer-dependencies=false && pnpm update --latest"
tags:
- pnpm
description: "Sets strict-peer-dependencies to false globally and updates each dependency in package.json to the latest version."
arguments: []
source_url: "https://github.com/pnpm/pnpm/issues/4651"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
11 changes: 11 additions & 0 deletions specs/pnpm/update_pnpm_to_the_latest_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Update PNPM to the latest version
command: pnpm update -g pnpm
tags:
- pnpm
description: Updates pnpm to the latest version.
arguments: []
source_url: "https://pnpm.io/cli/update"
author: Tim Smith
author_url: "https://timsmith.tech"
shells: []
15 changes: 15 additions & 0 deletions specs/shell/make_a_dir_and_change_into.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Make a directory and change into it
command: mkdir {{dirname}} && cd $_
tags:
- shell
description: Runs `mkdir` followed by `cd`. Generated by Warp AI.
arguments:
- name: dirname
description: The directory name to make and get into
source_url: "https://www.craft.do/s/1BYQC2mvGK82DC"
author: blinpete
author_url: "https://github.com/blinpete"
shells:
- Zsh
- Bash
4 changes: 2 additions & 2 deletions specs/zip/compress_subdirectories_under_folder.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Compression all subdirectories and output each directory as a zip file.
command: "for dir in $(ls -d {{directory}}*/); do (zip -r {{opitons}} {{output}}$(basename $dir){{name_with_str}}.zip ${dir}{{zip_pattern}} && echo -e \"Compressed to {{output}}$(basename $dir){{name_with_str}}.zip.\"); done"
command: "for dir in $(ls -d {{directory}}*/); do (zip -r {{options}} {{output}}$(basename $dir){{name_with_str}}.zip ${dir}{{zip_pattern}} && echo -e \"Compressed to {{output}}$(basename $dir){{name_with_str}}.zip.\"); done"
tags:
- zip
description: Use zip to compress all subdirectories under a folder and output each directory as a zip file.
arguments:
- name: directory
description: Optional, The directory to execute. default is current directory.
default_value: ./
- name: opitons
- name: options
description: Optional, The options of zip command.
default_value: -q
- name: zip_pattern
Expand Down

0 comments on commit 6daae84

Please sign in to comment.