https://github.com/github/training-utils
A series of Bash and ZShell scripts useful when teaching about git and GitHub
https://github.com/github/training-utils
Last synced: about 1 year ago
JSON representation
A series of Bash and ZShell scripts useful when teaching about git and GitHub
- Host: GitHub
- URL: https://github.com/github/training-utils
- Owner: github
- License: mit
- Created: 2015-01-15T21:25:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T14:13:00.000Z (about 2 years ago)
- Last Synced: 2025-02-18T08:08:54.882Z (about 1 year ago)
- Language: Ruby
- Size: 897 KB
- Stars: 144
- Watchers: 17
- Forks: 42
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: historytailbash
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-campus-expert - github/training-utils - A series of Bash and ZShell scripts useful when teaching about git and GitHub (+ bonus [list of useful apps](https://github.com/github/training-utils#other-useful-apps)) (Workshops / Teaching)
README
# Training::Utils
This is a package of git- and github-training scripts into an easily-installed package. This collection of utilities originated [here](https://github.com/matthewmccullough/scripts).
## Installation
If you have Ruby >= 1.9 installed, you can install these scripts into a directory in your `$PATH` by running:
```
$ script/bootstrap
```
## Usage
#### `generaterandomchanges `
Generates **N** new **commits**, the content of each is a new file named "`.`" with some random text.
```
$ generaterandomchanges 3 file txt
[master f377b54] A random change of 27129 to file1.txt
2 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 file1.txt
[master fd0965c] A random change of 15808 to file2.txt
1 file changed, 1 insertion(+)
create mode 100644 file2.txt
[master a704698] A random change of 26224 to file3.txt
1 file changed, 1 insertion(+)
create mode 100644 file3.txt
$ ls
README.md file1.txt file2.txt file3.txt
$ git log --oneline
a704698 A random change of 26224 to file3.txt
fd0965c A random change of 15808 to file2.txt
f377b54 A random change of 27129 to file1.txt
ec9bce1 Add readme
```
#### `generaterandomfiles `
Generates **N** new **files**, each named "`.`" with some random text.
```
$ generaterandomfiles 3 stuff txt
$ ls
README.md stuff1.txt stuff2.txt stuff3.txt
$ git log --oneline
ec9bce1 Add readme
$ cat stuff1.txt
Some random text: 10660
```
#### `git-graphlive `
Perpetually loop `git --no-pager log - --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s' --abbrev-commit --date=relative`. It's like "tail -f" for `git log`. It's sometimes useful to have this on a split screen, showing the git one-line, ASCII art git graph.
```
$ git graphlive 5
* 6cad0b4 - (HEAD, master) A random change of 19964 to file30.txt
* c9fd401 - A random change of 16742 to file29.txt
* d5794af - A random change of 22469 to file28.txt
* b2110a3 - A random change of 32088 to file27.txt
* 75d01a9 - A random change of 12572 to file26.txt
```
#### `historytailbash` and `historytailzsh`
Perpetually loop through `history`. It's like `tail -f` for history. Comes in `bash` and `zsh` flavors. It's sometimes useful to have this on a split screen, showing the recent history of commands.
#### `transpose .csv`
Generate a transposed `*.csv` file from an input file.
#### `treelive `
Perpetually loop `tree`, up to `depth` folders deep in the hierarchy.
#### `welcome `
Prints a welcome message:
```
-------------------------------------------------
Welcome to class on: Wed Jan 14 17:00:35 CST 2015
I'm Instructor Name Here, your instructor
-------------------------------------------------
```
## Other Useful Apps
When training, we use lots of other apps. Here are some of our favorites:
- [Caffeine](https://itunes.apple.com/us/app/caffeine/id411246225)
- [Mouseposé](https://itunes.apple.com/app/mousepose/id405904955?mt=12)
- [ScreenFlow](http://www.telestream.net/screenflow/overview.htm) for recording screen casts
- Skitch classic for Mac OSX (hard DMG to find nowadays)
- [Quickres](http://www.quickresapp.com/)
- [Switch ResX](http://www.madrau.com/)
- [Shush](https://itunes.apple.com/us/app/shush-microphone-manager/id496437906?mt=12)
- [AirSketch](http://www.qrayon.com/home/airsketch/)
- [A Web Whiteboard](https://awwapp.com/)
- [Duet Display](http://www.duetdisplay.com/)
- [Slate](https://github.com/jigish/slate) (looks like it stopped getting commits in 2013, but I still use it
- [Divvy](http://mizage.com/divvy/)
- [Better Snap Tool](https://itunes.apple.com/us/app/bettersnaptool/id417375580?mt=12)
## Contributing
1. Fork it ( https://github.com/github/training-utils/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request