Skip to content

Instantly share code, notes, and snippets.

@afontaine
afontaine / git-ignore
Last active December 19, 2015 10:09
Custom git script to create/append .gitignore file with provided arguments from gitignore.io's REST api. Move to anywhere in your PATH. Generate/Append the repo's .gitignore file using the gitignore.io api git-ignore [-l] <types> ... -l If no other option is present, list available templates. If options do exist, output is redirected to stdout. …
#!/bin/sh
USAGE="[-l] <types> ..."
LONG_USAGE="Generate/Append the repo's .gitignore file using the gitignore.io api
-l
If no other option is present, list available templates.
If options do exist, output is redirected to stdout.
`curl -s http://gitignore.io/api/`"

FarmSpot

Farm management in the cloud!

FarmSpot allows you to easily manage your farm by setting up fields, giving you access to historic weather and crop price data, tracking harvests, and selling your crop.

Fields

Using leaflet and satelite imagery, defining a field is as simple as drawing on a map. The map even calculates the size of the field for you.

Android and Travis CI

  1. Enable gradle wrapper for your project.
  2. Place wait_for_emulator.sh in a folder named ci, and place .travis.yml in the root of your repository.
  3. Push to Github
  4. Enable Travis CI for your repo.
  5. Watch the continuous integration magic happen.

NOTE: Don't forget to keep .travis.yml up to date with new buildtools, gradle versions, and android versions as you develop.

@afontaine
afontaine / CaptainsChair.java
Created April 21, 2014 18:59
Implementation of captain's chair in java
/**
* Class that represnets a "Captain's Chair"
* It extends the {@link Chair} class and implements the {@link Conn} interface,
* providing a place to sit and control of the ship
*
* TODO Make into a singleton pattern
*/
class CaptainsChair extends Chair implements Conn {
/**

Keybase proof

I hereby claim:

  • I am afontaine on github.
  • I am afontaine (https://keybase.io/afontaine) on keybase.
  • I have a public key whose fingerprint is 888E B755 3032 D2ED 3AC3 2BA3 1708 E4F7 FE88 5CB4

To claim this, I am signing this object:

@afontaine
afontaine / hackathon.sh
Created February 2, 2015 21:03
Given a list of repositories, an install of git-bash (or equivalent) and gource + ffmpeg, combine all the repositories into one gource visualization with a logo.
#!/bin/sh
powershell -Command '
Get-ChildItem -Directory | ForEach-Object {
cd $_;
git pull;
cd ..;
gource --output-custom-log "$($_.Name).txt" $_
}
'
cat *.txt | sort -n > gource.log