Skip to content

Instantly share code, notes, and snippets.

View jgonzalezd's full-sized avatar
:octocat:
.

Julian Gonzalez jgonzalezd

:octocat:
.
View GitHub Profile
@jgonzalezd
jgonzalezd / gist:7158104
Created October 25, 2013 17:03
initCommandLineOptions() contains the arguments allowed to be set in the command line when calling the class SoapUITestCaseRunner
protected SoapUIOptions initCommandLineOptions()
{
SoapUIOptions options = new SoapUIOptions( "testrunner" );
options.addOption( "e", true, "Sets the endpoint" );
options.addOption( "s", true, "Sets the testsuite" );
options.addOption( "c", true, "Sets the testcase" );
options.addOption( "u", true, "Sets the username" );
options.addOption( "p", true, "Sets the password" );
options.addOption( "w", true, "Sets the WSS password type, either 'Text' or 'Digest'" );
options.addOption( "i", false, "Enables Swing UI for scripts" );
@jgonzalezd
jgonzalezd / flatten_recursively
Last active November 16, 2016 22:20
Array class gets a new flatten method
module Recursive
class ::Array
def flatten_recursively
self.each_with_object([]) do |item, flattened|
item.is_a?(Array) ? flattened += item.flatten_recursively : flattened.push item
end
end
end
end
@jgonzalezd
jgonzalezd / script.html.erb
Created February 11, 2017 22:13
Js component for .html.erb files
<%= content_for :script do%>
<script type="text/javascript">
$( document ).ready(function() {
});
</script>
<% end %>
@jgonzalezd
jgonzalezd / application.html.erb
Created February 12, 2017 00:25
Application Layout for better assets pipeline
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= yield :css %>
<%= csrf_meta_tags %>
</head>
//= require jquery
//= require jquery_ujs
// NOTICE NONE OF THE BELOW WILL BE INCLUDED ANYMORE IN THE MAIN FILE
// require jquery-ui/autocomplete
// require jquery-fileupload/basic
// require jquery-fileupload/vendor/tmpl
// require bootstrap-sprockets
// require moment.min
app/
├── assets/
| ├── javascripts/
│ | ├── application.js
| │ ├──pages/
| | | ├──home.js
| | | ├──home/
| | | ├──hero.js
| | | ├──search_form.js
| ├── stylesheets
<% provide :title, 'Ofertas que valen la pena' %>
<%= content_for :script do%>
<%= javascript_include_tag 'pages/home' %>
<% end %>
<%= content_for :css do%>
<%= stylesheet_link_tag 'pages/home' %>
<% end %>
<%= content_for :script do %>
<%= javascript_include_tag 'pages/home/search_form' %>
<%= javascript_include_tag 'jquery-ui/autocomplete' %>
<% end %>
<%= content_for :css do%>
<%= stylesheet_link_tag 'pages/home/search_form' %>
<% end %>
<div class="row">
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w( jquery-ui/autocomplete.js )
Rails.application.config.assets.precompile += %w( pages/home.* )
Rails.application.config.assets.precompile += %w( pages/home/search_form.* )
@import 'bootstrap';
@import 'simplify';
@import 'font-awesome';
// @import 'bootstrap-social';
// @import 'jquery.tagsinput';
// @import 'jquery.autocomplete';
// @import 'bootstrap-datetimepicker';
// @import 'selectize.bootstrap3';
// @import 'sweetalert';
// @import 'jquery-ui/autocomplete';