Skip to content

Instantly share code, notes, and snippets.

View leompeters's full-sized avatar
😎
...

Leo M. Peters leompeters

😎
...
View GitHub Profile
@leompeters
leompeters / request_env_variables.html.erb
Last active August 29, 2015 14:04
List all variables of HTTP Request Environment.
<!--
-- Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
-- Copyright (c) 2013 by Belanton, Inc. All Rights Reserved.
-->
<html>
<head>
<title>Belanton | Codes | Scripts | Request Env Variables</title>
<meta name="description" content="https://gist.github.com/leonardomarques/3873420f180d51a17854">
<meta name="keywords" content="Belanton,team,web,development,Ruby,Rails,ERB,HTML,request,env,environment,variables">
<meta name="author" content="Leonardo Marques - Belanton Team [http://www.belanton.com]">
@leompeters
leompeters / rake_routes.html.erb
Last active August 29, 2015 14:04
List Rake Routes of your application.
<!--
-- Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
-- Copyright (c) 2013 by Belanton, Inc. All Rights Reserved.
-->
<html>
<head>
<title>Belanton | Codes | Scripts | Rake Routes</title>
<meta name="description" content="https://gist.github.com/leonardomarques/39079af10483c1f6d096">
<meta name="keywords" content="Belanton,team,web,development,Ruby,Rails,ERB,HTML,rake,routes">
<meta name="author" content="Leonardo Marques - Belanton Team [http://www.belanton.com]">
@leompeters
leompeters / paper_trail_versions.html.erb
Last active August 29, 2015 14:04
List widget versions provided by Paper Trail.
<!--
-- Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
-- Copyright (c) 2013 by Belanton, Inc. All Rights Reserved.
-->
<html>
<head>
<title>Belanton | Codes | Scripts | Paper Trail Versions</title>
<meta name="description" content="https://gist.github.com/leonardomarques/10afbd987bd712cd14db">
<meta name="keywords" content="Belanton,team,web,development,Ruby,Rails,ERB,HTML,paper,trail,versions">
<meta name="author" content="Leonardo Marques - Belanton Team [http://www.belanton.com]">
@leompeters
leompeters / form_input_focus.js
Last active August 29, 2015 14:05
JavaScript and CoffeeScript for focus on the first visible field of the first HTML form.
/**
* Miscellaneous JavaScript for focus on the first visible field of the first form.
*
* @namespace Belanton.Codes.Scripts
* @see https://gist.github.com/leonardomarques/f743541353e7d4148852
* @author Leonardo Marques <leonardo.marques@belanton.com>
* @license Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
* @copyright Copyright (c) 2013 Belanton, Inc. [http://www.belanton.com]
*/
@leompeters
leompeters / autocomplete.js
Last active September 30, 2020 19:42
JavaScript and CoffeeScript for autocomplete input fields with ajax request and json.
/**
* Miscellaneous JavaScript for autocomplete input fiels with ajax request and json.
*
* @namespace Belanton.Codes.Scripts
* @see https://gist.github.com/leonardomarques/6970e7d86409f35bb3fd
* @author Leonardo Marques <leonardo.marques@belanton.com>
* @license Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
* @copyright Copyright (c) 2013 Belanton, Inc. [http://www.belanton.com]
*/
@leompeters
leompeters / belanton_atom_settings
Last active December 17, 2018 16:41
Atom editor settings for Belanton Team.
Atom editor settings for Belanton Team.
You can use these settings on your Atom editor [http://atom.io] copy. Here are
defaults Atom config files (config.cson, init.coffee, keymap.cson, snippets.cson and
styles.less) and Project Manager package list [http://atom.io/packages/project-manager].
@leompeters
leompeters / index.json.jbuilder
Last active August 29, 2015 14:05
JSON script in Jbuilder declaration for getting object fields.
###
# JSON script in Jbuilder declaration for getting object fields.
#
# @namespace Belanton.Codes.Rails.Jbuilder
# @see https://gist.github.com/leonardomarques/d40ecd7a63a30b314444
# @author Leonardo Marques <leonardo.marques@belanton.com>
# @license Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
# @copyright Copyright (c) 2013 Belanton, Inc. [http://www.belanton.com]
###
@leompeters
leompeters / rails_cache
Last active August 29, 2015 14:05
Action and Fragment caching supported by Rails.
Action and Fragment caching supported by Rails.cache, working like caching in HTML templates:
@leompeters
leompeters / disqus.css
Created August 26, 2014 15:16
Custom CSS Code for Disqus Comment System
#dsq-comments-title h4 {
color:#333;
}
#disqus_thread {
padding:12px;
margin-bottom:-10px;
}
#disqus_thread h4 {
color:#333;
font-family: Helvetica, sans-serif;
@leompeters
leompeters / bootstrap-typeahead-combobox.html.erb
Last active May 7, 2020 19:22
Choose how input to use with bootstrap-combobox.
<!-- Choose how input to use with bootstrap-combobox. -->
<%= f.input :parent_name, label: false, hint: false do %>
<div class="input-append input-block-level">
<%= f.input_field :parent_name, as: :string, placeholder: false, disabled: true,
autocomplete: "off", data: { provide: "typeahead" } %>
<span id="tog" class="add-on typeahead-toggle">
<span class="caret"></span>
</span>
</div> <!-- /.input-append -->