{"id":22455905,"url":"https://github.com/theapache64/bash_rc","last_synced_at":"2025-09-05T13:40:06.005Z","repository":{"id":86799222,"uuid":"96399160","full_name":"theapache64/bash_rc","owner":"theapache64","description":"My bash shortcuts","archived":false,"fork":false,"pushed_at":"2017-07-06T07:08:32.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T08:51:44.543Z","etag":null,"topics":["ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theapache64.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":"2017-07-06T07:02:49.000Z","updated_at":"2017-07-06T07:09:05.000Z","dependencies_parsed_at":"2023-03-07T11:46:09.190Z","dependency_job_id":null,"html_url":"https://github.com/theapache64/bash_rc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theapache64/bash_rc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fbash_rc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fbash_rc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fbash_rc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fbash_rc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theapache64","download_url":"https://codeload.github.com/theapache64/bash_rc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fbash_rc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273766993,"owners_count":25164459,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"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":["ubuntu"],"created_at":"2024-12-06T07:13:47.339Z","updated_at":"2025-09-05T13:40:05.949Z","avatar_url":"https://github.com/theapache64.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash_rc\nMy bash shortcuts\n\nTo use these shortcuts from your terminal, simply paste the below script above your `~/.bashrc`.\n\nTo use SQL shortcuts, fill the empty variables (host,username and password).\n\n```\n# Git shortcuts\n\n# eg: push \"Your-commit-message\"\nfunction push(){\n\tgit add -A\n\tgit commit -m \"$1\"\n\tgit push origin master\n}\n\n# eg: commit \"Your-commit-message\"\nfunction commit(){\n\tgit add -A\n\tgit commit -m \"$1\"\n}\n\n\n# SQL shortcuts\n\nREMOTE_HOST=\"\"\nREMOTE_USERNAME=\"\"\nREMOTE_PASSWORD=\"\"\n\nLOCAL_USERNAME=\"\"\nLOCAL_PASSWORD=\"\"\n\n# To download sql backup from remote\n# eg: sql_backup \"your-database-name\"\nfunction sql_backup(){\n\tdt=$(date '+%d-%m-%Y_%H:%M:%S')\n\tlocal fn=\"$1_backup_$dt.sql\"\n \techo \"Please wait... the backup is being generated :  $fn\"\n\n\tif mysqldump -h\"$REMOTE_HOST\" -u\"$REMOTE_USERNAME\" -p\"$REMOTE_PASSWORD\" \"$1\" \u003e \"$fn\"; then\n\t\tnotify-send -i face-smile \"SQL Backup finished\" \"$fn\"\n\telse\n\t    notify-send -i face-sad \"SQL Backup failed!\" \"$1\"\n\tfi\n}\n\n# To download sql backup from remote and replace with local\n# eg: sql_clone_remote \"your-database-name\"\nfunction sql_clone_remote(){\n\tdt=$(date '+%d-%m-%Y_%H:%M:%S')\n\tlocal fn=\"$1_backup_$dt.sql\"\n \techo \"Please wait, the sql file is being downloaded - $fn\"\n\n\tif mysqldump -h\"$REMOTE_HOST\" -u\"$REMOTE_USERNAME\" -p\"$REMOTE_PASSWORD\" \"$1\" \u003e \"$fn\"; then\n\t\tmysql -u\"$LOCAL_USERNAME\" -p\"$LOCAL_PASSWORD\" \"$1\" \u003c \"$fn\"\n\t\tnotify-send -i face-smile \"Synced\" \"Remote database synced with local\"\n\telse\n\t    notify-send -i face-sad \"SQL Backup failed! : $1\"\n\tfi\n}\n\n# To upload local database to remote and replace.\n# eg: sql_clone_local \"your-database-name\"\nfunction sql_clone_local(){\n\tdt=$(date '+%d-%m-%Y_%H:%M:%S')\n\tlocal fn=\"$1_backup_$dt.sql\"\n \techo \"Please wait, the sql file is being uploaded\"\n\n\tif mysqldump -u\"$LOCAL_USERNAME\" -p\"$LOCAL_PASSWORD\" \"$1\" \u003e \"$fn\"; then\n\t\tmysql -h\"$REMOTE_HOST\" -u\"$REMOTE_USERNAME\" -p\"$REMOTE_PASSWORD\" \"$1\" \u003c \"$fn\"\n\t\tnotify-send -i face-smile \"Synced\" \"Local database synced with remote, LIVE!\"\n\telse\n\t    notify-send -i face-sad \"SQL Backup failed! : $1\"\n\tfi\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Fbash_rc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheapache64%2Fbash_rc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Fbash_rc/lists"}