This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source CsvSource, {"type"=>"csv", "file"=>{"path"=>"/home/webonise/Projects/Data-Integration/dump/users.csv"}, "options"=>{"col_sep"=>";"}} | |
| transform RenameField, {"from"=>"euro", "to"=>"amount_euro"} | |
| destination AggregateFieldsDestination,{ 'file' => { 'path' =>'dump/1435811412.csv'}, 'options' => {"group_by"=>["name"], "sum"=>"amount_euro"} } | |
| source CsvSource,{ 'file' => { 'path' => 'dump/1435811412.csv' },'options' => {'col_sep' => ',' } } | |
| transform RenameField, {"from"=>"amount_euro", "to"=>"euro"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Swingable | |
| def self.included(base) | |
| base.extend(Swingable) | |
| end | |
| def swing | |
| puts 'Did a swing!' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sections = Section.includes(:questions).as_json( | |
| only: [:_id, :id, :name, :description, :template_id, :section_id], | |
| include: { | |
| questions: { | |
| only: [:_id, :description, :helptext] | |
| } | |
| } | |
| ) | |
| section_hash = sections.index_by { |node| node['_id'].to_s } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install java | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get install oracle-java8-installer | |
| # Install ubuntu-developer-tools-center | |
| sudo add-apt-repository ppa:didrocks/ubuntu-developer-tools-center |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| client = Client.new(name: 'Treeni') | |
| client.save! | |
| files = Dir["app/models/*.rb"] | |
| models = files.map { |file| file.split('/').last.sub(/\.rb/, '').camelize.constantize }.select { |i| i != Client } | |
| models.each { |model| model.update_all(client_id: client._id) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "theme": "El Capitan.sublime-theme", | |
| "el_capitan_font_default": false, | |
| "el_capitan_font_san_francisco": false, | |
| "el_capitan_font_helvetica_neue": false, | |
| "el_capitan_font_helvetica": false, | |
| "el_capitan_sidebar_blue_folders": false, | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| "draw_white_space": "all", | |
| "font_size": 12, |
OlderNewer