Skip to content

Instantly share code, notes, and snippets.

View souzagab's full-sized avatar
:shipit:

Gabriel S. souzagab

:shipit:
View GitHub Profile
#!/usr/bin/env ruby
require 'csv'
require 'json'
if ARGV.size != 2
puts 'Usage: csv_to_json input_file.csv output_file.json'
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects'
exit(1)
end
@souzagab
souzagab / pre-commit
Created March 15, 2021 11:55 — forked from ppdeassis/pre-commit
Git pre-commit hook for a rails project. Add it to your `repo/.git/hooks/pre-commit` file and make sure it has +x permission.
#!/bin/bash
#
# install into git dir:
# curl \
# -fSL https://gist.githubusercontent.com/ppdeassis/48387d9f49b41af23e7d/raw/e1b6a2d4c9257ed6eecefedebeafa3655c98bb7a/pre-commit \
# -o .git/hooks/pre-commit \
# && chmod +x .git/hooks/pre-commit
#
#!/bin/bash