Skip to content

Instantly share code, notes, and snippets.

View juarezpaf's full-sized avatar

Juarez Filho juarezpaf

View GitHub Profile
App.Adapter = DS.RESTAdapter.extend
serializer: DS.RESTSerializer.extend
extract: (loader, json, type, record) ->
root = @rootForType(type)
// Embed JSON data in a new object with root element
newJSON = {}
newJSON[root] = json
json = newJSON
//
<!doctype html>
<html lang="pt-br">
<head>
<!-- Dentro da tag <head> colocaremos todos os detalhes do nosso site:
incluindo título, metatags, links e afins -->
<meta charset="UTF-8">
<title>Meu primeiro site</title>
</head>
<body>
<!-- Todos os elementos colocados dentro da tag <body> serão visualizados no navegador
@juarezpaf
juarezpaf / gist:4289332
Created December 14, 2012 22:48
example.html
<body>
<p id="teudo" class="class" rel="stylesheet">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor perspiciatis eligendi doloremque reprehenderit impedit itaque sed rem facere explicabo dolore cupiditate ducimus perferendis inventore. Ducimus minus nam aliquid aliquam eligendi.</p>
<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
@juarezpaf
juarezpaf / FrontCalendar 2012.md
Created September 5, 2012 19:55 — forked from zenorocha/FrontCalendar.md
FrontCalendar 2012

FrontCalendar 2012

Na falta de um site decente e realmente atualizado com os eventos de front-end que vão rolar, dê um pulo aqui ;)

Vai rolar!

Front in Maringá

  • Quando: 06/10
  • Onde: Maringá, PR
  • Preço: Em breve
@juarezpaf
juarezpaf / gist:2081192
Created March 18, 2012 20:40
Rails scaffold error
<% if @company.errors.any? %>
<div class="alert alert-error">
<a class="close" data-dismiss="alert">&times;</a>
<h2><%= pluralize(@company.errors.count, "error") %> prohibited this company from being saved:</h2>
<ul>
<% @company.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
add_action( 'init', 'register_cpt_habilidade' );
function register_cpt_habilidade() {
$labels = array(
'name' => _x( 'Habilidades', 'habilidade' ),
'singular_name' => _x( 'habilidade', 'habilidade' ),
'add_new' => _x( 'Adicionar nova', 'habilidade' ),
'add_new_item' => _x( 'Adicionar nova habilidade', 'habilidade' ),
'edit_item' => _x( 'Alterar habilidade', 'habilidade' ),
@juarezpaf
juarezpaf / gist:1081506
Created July 13, 2011 22:45
Stylesheets
Compressed file
all.css
Downloaded from internet
reset.css
By me
courses.css
home.css
lectures.css
jQuery(function($) {
/*Simple Tabs*/
//When page loads...
$(".tab_container > div").hide();
$("ul.tabs li:first").addClass("selected").show();
$(".tab_container > div:first").show();
//On Click Event
$("ul.tabs li").click(function() {
@juarezpaf
juarezpaf / gist:1018265
Created June 10, 2011 05:09
Um Brilho Saiu Do Seu Olhar...
http://www.midiagospel.com.br/variedades/poesias/um-brilho-saiu-do-seu-olhar.html
Um brilho saiu do seu olhar e inundou com alegria meu coração;
Um sonho tão doce para sonhar que desperta em nós a emoção;
Um sorriso abriu em meu viver com a voz que traz paz ao meu coração;
E por isso contigo eu quero ser um só corpo e com Deus estar em união;
O amor é assim, não dá pra explicar...
O amor é assim, nos faz sonhar;
O amor verdadeiro entre um homem e uma mulher é puro;
Eu sei que foi Deus que fez você para mim;
@juarezpaf
juarezpaf / JavaScriptMVC.md
Created June 8, 2011 17:49 — forked from jupiterjs/JavaScriptMVC.md
JavaScriptMVC Overview

The following is a VERY rough draft of an article I am working on for Alex MacCaw's @maccman's Book. It is very rough, but even now a worthwhile read. Suggestions / comments are very welcome! Please help me :-)

Introduction

JavaScriptMVC (JMVC) is an open-source jQuery-based JavaScript framework. It is nearly a comprehensive (holistic) front-end development framework, packaging utilities for testing, dependency management, documentation, and a host of useful jQuery plugins.

Yet every part of JavaScriptMVC can be used without every other part, making the library lightweight. Its Class, Model, View, and Controller combined are only 7k minified and compressed, yet even they can be used independently. JavaScriptMVC's independence lets you start small and scale to meet the challenges of the most complex applications on the web.

This chapter covers only JavaScriptMVC's $.Class, $.Model, $.View, and $.Controller. The following describes each component: