https://github.com/ranman/gitshots-server
Making open source funnier one commit at a time
https://github.com/ranman/gitshots-server
Last synced: about 1 year ago
JSON representation
Making open source funnier one commit at a time
- Host: GitHub
- URL: https://github.com/ranman/gitshots-server
- Owner: ranman
- Created: 2013-04-06T05:21:31.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-09-08T05:47:52.000Z (almost 11 years ago)
- Last Synced: 2025-03-29T09:02:33.530Z (about 1 year ago)
- Language: CSS
- Homepage: gitshots.com
- Size: 5.93 MB
- Stars: 39
- Watchers: 2
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gitshots — remember every commit
## Testing Gitshots server with docker-compose
git clone https://github.com/ranman/gitshots
docker-compose build
docker-compose up -d
docker-compose logs
## Setting up your own Gitshots server
Setting up your own Gitshots server is as easy as deploying to Heroku (just copy and paste these commands).
git clone https://github.com/ranman/gitshots
heroku create
heroku addons:add mongohq:sandbox
git push heroku master
If you don't want to set up your own Gitshots server, feel free to use [ranman's](http://gitshots.ranman.org) (it's the default).
If you'd rather not post to Gitshots in general, just record to disk, set the GITSHOTS_SERVER_URL to `False`
## Taking a gitshot on every commit
With your Gitshots server setup, you need to configure your computer to take gitshots.
First, add the following line to your `.bash_profile` or `.bashrc`. If you don't add this line with your server URL, your gitshots will be posted to [ranman's gitshot server](http://gitshots.ranman.org).
export GITSHOTS_SERVER_URL=
Next, you'll need to make sure you have `python2.7` and the `requests` library:
pip install requests
Next, you'll need to make sure you have `imagesnap`, on OSX you can easily install it with [homebrew](http://mxcl.github.io/homebrew/):
brew install imagesnap
Next, in any repository that you want gitshots, you need to add the following line to your `.git/hooks/post-commit` file (if you don't have one, create one):
/usr/bin/env python2.7 PATH_TO_GITSHOTS_REPO/post-commit.py
Next, you should install CoreLocationCLI a command line program to print location information from CoreLocation
cd /tmp
git clone git@github.com:fulldecent/corelocationcli.git
cd corelocationcli
xcodebuild
mv build/Release/CoreLocationCLI /usr/bin
USAGE: CoreLocationCLI [options]
Displays current location using CoreLocation services.
By default, this will continue printing locations until you kill it with Ctrl-C.
More info: https://github.com/fulldecent/corelocationcli
An easy way to ensure your gitshots take for every new repository you create in the future is to add the following file at `/usr/share/git-core/templates/hooks/post-commit` or `/usr/local/share/git-core/templates/hooks/post-commit` depending on your installation of git.
#!/bin/sh
# takes a gitshot on every commit
/usr/bin/env python2.7 PATH_TO_GITSHOTS_REPO/post-commit.py
Be sure to mark both of these files as executable: `chmod +x post-commit`