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 / 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 / activities_timeline_twb23.html
Created October 9, 2014 18:19
Activities Timeline with Twitter Bootstrap 2.3
<table>
<tr>
<td valign="top">2/4/2013</td>
<td>
<dl class="dl-activities">
<dt>
<button type="button" class="btn btn-mini btn-success disabled" disabled="disabled">
<i class="icon-plus icon-white"></i>
</button>
</dt>
@leompeters
leompeters / full-images.css
Created March 5, 2015 18:50
Full expand images on web page.
body {
margin: 0;
}
#full > img {
display: block;
float: left;
width: 50vw;
height: 50vh;
object-fit: cover;
@leompeters
leompeters / _shim.html
Created June 2, 2015 16:34
Polyfill for CSS3 Media Queries Respond.js, HTML 5 shim which enables use of HTML5 elements, and a proper IE <meta> tag in the HTML head to ensure that IE is not running in compatibility mode.
<head>
...
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
@leompeters
leompeters / dynamic-row
Last active August 29, 2015 14:28
Add and remove row dynamically.
Add and remove row dynamically.