Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">
var listaProdutos = [];
for(var i = 0; i < document.getElementsByClassName("id-produto").length; i++)
{
if(i < 3)
{
listaProdutos.push(document.getElementsByClassName("id-produto")[i].innerHTML);
}
}

Elegant login button using CSS3 transitions.

Inspired from Giantbomb's own Login button. I made this to learn how they did it; turns it out it's quite simple but with a powerful elegance behind it.

A Pen by Sergio Tapia Gutierrez on CodePen.

License.

/**
* Convert mouse events into touch events.
* From: http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/
*/
function touchHandler(event) {
var touch = event.changedTouches[0];
var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent({
touchstart: "mousedown",
CSS Escalavél
/** CSS Reset **/
http://meyerweb.com/eric/tools/css/reset/
/** GuideLine @mdo
http://mdo.github.io/code-guide/
/** Modularização folhas de estilo **/
http://codepen.io/chriscoyier/blog/codepens-css#organization-files
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
$("#user_picture").change ->
userPictureFileName = $(this).val().split('\\').pop();
$("#user_picture_text").html(userPictureFileName)
files = this.files
reader = new FileReader()
reader.readAsDataURL(files[0])
reader.onloadend = ->
$("#profile_pic").css("background-image", "url(" + this.result + ")")
$("#user_cover_photo").change ->
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
#AngularJS Application List (sorted alphabetically)
Here is a list of some Angular Free Application / snippets to help you out with your projects
angular git://github.com/angular/bower-angular.git
25th-angular-utils git://github.com/25th-floor/angular-utils.git
28.io-angularjs git://github.com/28msec/28.io-angularjs.git
4vanger-angular-l10n git://github.com/4vanger/angular-l10n.git
Angular-NestedSortable git://github.com/JimLiu/Angular-NestedSortable.git
Angular-localStorage git://github.com/agrublev/Angular-localStorage.git