Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Julian Gonzalez jgonzalezd

🏠
Working from home
  • Medellin, Colombia
Block or report user

Report or block jgonzalezd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View application.scss
@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';
View assets.rb
# 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.* )
View _search_form.html.erb
<%= 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">
View home.html.erb
<% 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 %>
View directory_structure.txt
app/
├── assets/
| ├── javascripts/
│ | ├── application.js
| │ ├──pages/
| | | ├──home.js
| | | ├──home/
| | | ├──hero.js
| | | ├──search_form.js
| ├── stylesheets
View application.js
//= 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
@jgonzalezd
jgonzalezd / application.html.erb
Created Feb 12, 2017
Application Layout for better assets pipeline
View application.html.erb
<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>
@jgonzalezd
jgonzalezd / script.html.erb
Created Feb 11, 2017
Js component for .html.erb files
View script.html.erb
<%= content_for :script do%>
<script type="text/javascript">
$( document ).ready(function() {
});
</script>
<% end %>
@jgonzalezd
jgonzalezd / flatten_recursively
Last active Nov 16, 2016
Array class gets a new flatten method
View flatten_recursively
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 / gist:7158104
Created Oct 25, 2013
initCommandLineOptions() contains the arguments allowed to be set in the command line when calling the class SoapUITestCaseRunner
View gist:7158104
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" );
You can’t perform that action at this time.