{"id":25824466,"url":"https://github.com/petitviolet/shell_commands","last_synced_at":"2026-06-04T20:31:14.932Z","repository":{"id":27476580,"uuid":"30956212","full_name":"petitviolet/shell_commands","owner":"petitviolet","description":"handmade shell commands","archived":false,"fork":false,"pushed_at":"2022-01-07T00:46:15.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T18:28:00.565Z","etag":null,"topics":["shell","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petitviolet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-18T07:31:20.000Z","updated_at":"2022-01-07T00:46:17.000Z","dependencies_parsed_at":"2022-09-02T07:51:48.655Z","dependency_job_id":null,"html_url":"https://github.com/petitviolet/shell_commands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/petitviolet/shell_commands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petitviolet%2Fshell_commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petitviolet%2Fshell_commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petitviolet%2Fshell_commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petitviolet%2Fshell_commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petitviolet","download_url":"https://codeload.github.com/petitviolet/shell_commands/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petitviolet%2Fshell_commands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33917202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["shell","zsh"],"created_at":"2025-02-28T12:51:54.273Z","updated_at":"2026-06-04T20:31:14.913Z","avatar_url":"https://github.com/petitviolet.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# handmade shell commands \n\n## s3_image\n\n\n### usage\n\n```sh\nexport AWS_PROFILE=\u003cyour aws profile\u003e\nexport BUCKET_NAME=\u003cyour bucket to upload\u003e\nexport S3DIRECTORY=\u003cyour directory to upload\u003e\n\ns3_image [upload|url] \u003cimage path\u003e\n```\n\n### show image url\n\nuse `s3_image url \u003cpath\u003e`.\n\n```sh\n$ BUCKET_NAME=MYBUCKET S3DIRECTORY=path/to/image s3_image url local/image/file.png\nhttps:/MYBUCKET.s3.amazonaws.com/path/to/image/file.png\n```\n\n### upload image and get url\n\nuse `s3_image upload \u003cpath\u003e`.\n\n```sh\n$ BUCKET_NAME=petitviolet S3DIRECTORY=path/to/image AWS_PROFILE=s3 s3_image upload ~/tmp/scala.png\nupload: ../../tmp/scala.png to s3://petitviolet/path/to/image/scala.png\nhttps://petitviolet.s3.amazonaws.com/path/to/image/scala.png%\n```\n\n## loading\n\nshow loading indicator.\n\nreference in Japanese.\n[Zshで長い処理をしている間に読込中を表示する - Qiita](http://qiita.com/petitviolet/items/5cc1916eb3fdb8d54823)\n\n```sh\nloading 5\n# loading \u003cseconds\u003e\n```\n\n![loading](https://petitviolet.s3.amazonaws.com/public/image/loading_indicator.gif)\n\n### using loading indicator in other function\n\n```sh\nother_function() {\n    # show loading indicator\n    ## disable job control to suppress print process id\n    set +m\n    loading 100 \u0026\n    set -m\n    local loading_pid=$!\n\n    # execute heavy command\n    do_something_heavy\n\n    # remove indicator \n    kill -INT $loading_pid \u0026\u003e/dev/null\n}\n```\n\n## remark\n\nShow presentation using [remark.js](https://github.com/gnab/remark) from markdown file.\n\n```sh\nremark /path/to/markdown/file.md\n```\n\nOpen presentation on Google Chrome.\n\n## git subcommands\n\n### git update\n\nfetch and rebase remote branch with stash local changes.\n\n```shell-session\ngit update\n```\n\n### git browse\n\nopen current branch and directory on remote.\n\n```shell-session\ngit browse\n```\n\n### git replace\n\nreplace strings with `sed`.\n\n```shell-session\ngit replace hoge foo\n```\n\n# LICENSE\n\n[MIT License](https://petitviolet.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetitviolet%2Fshell_commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetitviolet%2Fshell_commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetitviolet%2Fshell_commands/lists"}