Skip to content

Instantly share code, notes, and snippets.

View marcelod's full-sized avatar
🎯
Focusing

Marcelo Diniz marcelod

🎯
Focusing
  • São Paulo - Brasil
View GitHub Profile
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=novo_nome_arquivo.pdf nome_arquivo.pdf
Uma ajuda também em https://www.vivaolinux.com.br/dica/GhostScript-Reduzindo-o-tamanho-de-arquivos-PDF-pelo-terminal
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `legislacao` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2694 ;
INSERT INTO `legislacao` (`id`, `name`) VALUES
(1, 'CONSTITUIÇÃO da REPÚBLICA FEDERATIVA do BRASIL'),
<?php
return [
// http://www.cidades.ibge.gov.br/download/mapa_e_municipios.php?uf=ac (Thu May 14 16:30:15 BRT 2015)
'AC' => [
1200013 => 'Acrelândia',
1200054 => 'Assis Brasil',
1200104 => 'Brasiléia',
1200138 => 'Bujari',
1200179 => 'Capixaba',
@marcelod
marcelod / gist:68d1301e6a6025fb3920
Created January 22, 2015 17:20
A história do Cotoco
A história do Cotoco
Parte I
Cotoco era um menino muito, muito, mas muito triste, pois não tinha os dois braços e as duas pernas . . . .
Os amigos sempre tentavam levá-lo pra passear e se divertir.
Um dia o pessoal resolveu ir à praia.
- Já sei! Vamos levar o Cotoco - disse alguém. . . .
- É isso! Vamos, Cotoco, a gente vai pra praia e vamos te levar com a gente.
- Não, de jeito nenhum! Vocês não vão se divertir se me levarem. . .
@marcelod
marcelod / gist:7147463
Created October 25, 2013 00:22
minha configuração no apache 2.4.6 no ubuntu 13.10 para funcionar o mod_rewrite /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com