Skip to content

Instantly share code, notes, and snippets.

@ibrahima
ibrahima / pre-commit
Last active August 9, 2018 19:03 — forked from jamtur01/pre-commit
A Terraform validation and formatting pre-commit hook
#!/usr/bin/env bash
set -e
# Formats any *.tf files according to the hashicorp convention
files=$(git diff --cached --name-only --diff-filter=d)
for f in $files
do
if [ -e "$f" ] && [[ $f == *.tf ]]; then
terraform fmt -check=true $f
fi
# encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
attr_reader :file
include CarrierWave::RMagick
include Magick
storage :file
package edu.berkeley.nlp.starcraft.collect;
import java.util.AbstractCollection;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;