Skip to content

Instantly share code, notes, and snippets.

View karavanis's full-sized avatar

Konstantinos Aravanis karavanis

  • Leonteq Securities AG
  • Zurich, Switzerland
View GitHub Profile
@karavanis
karavanis / commit-msg
Last active August 29, 2015 13:57 — forked from codesnik/commit-msg
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "SYSRAP-123", automatically
# adds "Refs #SYSRAP-123." to commit messages unless they mention "#SYSRAP-123" already.
#
# By Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License.
#
#
# Install:
#
#!/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
# self
class Foo
# self
# belongs_to
def Foo.foo
@bla = '123'
puts 'bla'
end