Skip to content

Instantly share code, notes, and snippets.

View juarezpaf's full-sized avatar

Juarez Filho juarezpaf

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>::jquery::</title>
<link rel="stylesheet" href="jquery-ui-theme/ui.core.css" type="text/css" />
<link rel="stylesheet" href="jquery-ui-theme/ui.datepicker.css" type="text/css" />
<link rel="stylesheet" href="jquery-ui-theme/humanity/ui.theme.css" type="text/css" />
<style>
.ui-button:hover { border: 1px solid #444;cursor:pointer}
# simple capistrano task for wordpress deploy
# just replace the content to fit your app path and names
# and run cap deploy:setup && cap deploy
# you can also run a cap wordpress:upload_config to copy the local config-sample.php to remote shared folder
# warning: this recipe don't create the database
# APP SETTINGS
set :application, "your_app_name"
set :domain_name , "yourdomain.com.br"
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() == '') {
input.addClass('placeholder');
#!/usr/bin/expect -f
# Password change shell script, tested on Linux and FreeBSD
# ----------------------------------
# Copyright (c) 2006 nixCraft project
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# display usage
@juarezpaf
juarezpaf / app.js
Created February 10, 2011 03:56 — forked from nickpettit/app.js
$(function() {
$("a.reset").toggle();
$("a.play").click(function () {
$(".color").toggleClass("on");
window.setTimeout(function() {
$("div").toggleClass("rounded");
}, 1000);
@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:

@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
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
//
App.PickADate = Ember.View.extend({
attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort',
'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today',
'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector',
'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'],
events: ['onOpen', 'onClose', 'onSelect', 'onStart'],
tagName: 'input',
classNames: 'pickadate',
App.PickADate = Ember.View.extend({
attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort',
'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today',
'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector',
'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'],
events: ['onOpen', 'onClose', 'onSelect', 'onStart'],
tagName: 'input',
classNames: 'pickadate',