Skip to content

Instantly share code, notes, and snippets.

View squiter's full-sized avatar

Brunno dos Santos squiter

View GitHub Profile
@squiter
squiter / migration.sh
Created October 6, 2011 14:23
Import MySQL dump to a database using parameters
#!/bin/bash
##################################################
#### Script para importar dumps de MySQL #########
#### #########
#### Instruções: #########
#### Sempre passar os parametros #########
#### -u Nome de usuário #########
#### -h Hostname #########
#### -d Nome do Banco #########
@squiter
squiter / migration.sh
Created October 6, 2011 13:49
Import MySQL dump to a database
#!/bin/bash
##################################################
#### Script para importar dumps de MySQL #########
##################################################
# Configurações
# Onde está seu MySQL?
MySQL="/opt/local/bin/mysql5"
@squiter
squiter / check_http.php
Created June 13, 2011 20:59
Get http response code from a URL
<?php
/*
* Check HTTP Header Response
* Author: Brunno dos Santos
* Version: 1.0
* Usage: run php check_http.php www.yoursite.com
*/
$ch = curl_init($argv[1]);
curl_setopt($ch, CURLOPT_NOBODY, 1);
@squiter
squiter / includes.php
Created May 26, 2011 20:30
Show all include pages
<?php
$included_files = get_included_files();
foreach ($included_files as $filename) {
echo "$filename\n";
}
?>
@squiter
squiter / vhosts.php
Created May 26, 2011 19:46
Script para automatização da criação dos Virtual Hosts usados nos servidores de desenvolvimento da Equipe Abstraindo
<?php
/*
* Title: vhost.php
* Create_date: 2011.02.23
* Author: Abstraindo Team
* Version: 0.1
* Desc: Script para auto inserção de virtual host do Apache,
* adição de regra no arquivo host e envio de e-mail para os
* interessados.
* HowToUse: execute sudo php vhost.php $endereçoVhost $pathProject