Skip to content

Instantly share code, notes, and snippets.

View paulodiovani's full-sized avatar

Paulo Diovani Gonçalves paulodiovani

View GitHub Profile
@paulodiovani
paulodiovani / gist:3625108
Created September 4, 2012 19:04 — forked from manfromanotherland/gist:2228169
jQuery: Placeholder Fix for IE
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[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.val() == input.attr('placeholder')) {
@paulodiovani
paulodiovani / Apache vhosts.conf
Created November 14, 2012 11:19
multiple php modules
##
## PHP 5.2 Vhost
##
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin pgoncalves@gvdasa.com.br
DocumentRoot "D:/www"
ServerName pgoncaves
ServerAlias php52.pgoncalves www.php52.pgoncalves
ErrorLog "logs/php52-error.log"
@paulodiovani
paulodiovani / Template:Revisoes
Last active December 10, 2015 22:38
Mediawiki template for revision table
{| Border="1"
! Revisão !! Comentário !! Data e hora !! Responsável
{{#if: {{{1|}}} | {{Revisoes_linha | {{{1}}} | {{{2}}} | {{{3}}} | {{{4}}} }} }}{{#if: {{{5|}}} | {{Revisoes_linha | {{{5}}} | {{{6}}} | {{{7}}} | {{{8}}} }} }}{{#if: {{{9|}}} | {{Revisoes_linha | {{{9}}} | {{{10}}} | {{{11}}} | {{{12}}} }} }}{{#if: {{{13|}}} | {{Revisoes_linha | {{{13}}} | {{{14}}} | {{{15}}} | {{{16}}} }} }}{{#if: {{{17|}}} | {{Revisoes_linha | {{{17}}} | {{{18}}} | {{{19}}} | {{{20}}} }} }}{{#if: {{{21|}}} | {{Revisoes_linha | {{{21}}} | {{{22}}} | {{{23}}} | {{{24}}} }} }}{{#if: {{{25|}}} | {{Revisoes_linha | {{{25}}} | {{{26}}} | {{{27}}} | {{{28}}} }} }}{{#if: {{{29|}}} | {{Revisoes_linha | {{{29}}} | {{{30}}} | {{{31}}} | {{{32}}} }} }}{{#if: {{{33|}}} | {{Revisoes_linha | {{{33}}} | {{{34}}} | {{{35}}} | {{{36}}} }} }}{{#if: {{{37|}}} | {{Revisoes_linha | {{{37}}} | {{{38}}} | {{{39}}} | {{{40}}} }} }}{{#if: {{{41|}}} | {{Revisoes_linha | {{{41}}} | {{{42}}} | {{{43}}} | {{{44}}} }} }}{{#if: {{{45|}}} | {{Revisoes_l
@paulodiovani
paulodiovani / sencha_package_build.bat
Created August 2, 2013 17:11
Script batch para build de pacotes de temas do ExtJs 4.2
:: Script para build dos packages de temas do ExtJs 4.2
:: Utiliza Sencha cmd e Compass
@echo off
title Build dos temas do Centris
:: Caminho para pasta packages
set packages_path=%CD%\packages
:: Comando de build
@paulodiovani
paulodiovani / .jshintrc
Last active January 4, 2016 22:19
Configuração para JSHint/JSLint com algumas permissões.
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : false, // true: Require {} for every new block or scope
@paulodiovani
paulodiovani / table_blank_line.css
Created February 14, 2014 18:46
Adicionando linhas em branco à tabelas
table tr.blank td,
table tr.blank td:hover {
height: 13px;
background: none !important;
border-left: none;
border-bottom: 1px solid #ddd;
outline: 1px solid white;
}
@paulodiovani
paulodiovani / shuffle.js
Created February 26, 2014 12:01
Returns a slightly reandomized version os an array.
(function() {
'use strict';
function shuffle(array) {
array.sort(function() {
return Math.floor( Math.random() * 3) -1;
});
return array;
}
@paulodiovani
paulodiovani / pulse-audio-volume-control.sh
Last active February 24, 2020 14:02
Volume control script for pulseaudio
#!/bin/sh
# pulsevol.sh
# PulseAudio Volume Control Script
# Original 2010-05-20 - Gary Hetzel <garyhetzel@gmail.com>
#
# Modified 2010-10-18 by Fisslefink <fisslefink@gmail.com>
# - Added support for multiple sinks and Ubuntu libnotify OSD
#
# Usage: pulsevol.sh [sink_index] [up|down|min|max|overmax|toggle|mute|unmute]
#
import re
from base_linter import BaseLinter, INPUT_METHOD_FILE
CONFIG = {
'language': 'XML',
'executable': 'xmllintschema',
'lint_args': ['-noout', '{filename}'],
'input_method': INPUT_METHOD_FILE
}
@paulodiovani
paulodiovani / picard_files.txt
Created June 7, 2014 01:07
Regras para renomear/mover arquivos no Musicbrainz Picard
$if2(%albumartistsort%,%artistsort%)/$if(%date%,$left(%date%,4) - )%album%/$if($gt(%totaldiscs%,1),%discnumber%-,)$num(%tracknumber%,2)$if(%compilation%, %artist% -,) %title%