This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$included_files = get_included_files(); | |
foreach ($included_files as $filename) { | |
echo "$filename\n"; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################## | |
#### Script para importar dumps de MySQL ######### | |
################################################## | |
# Configurações | |
# Onde está seu MySQL? | |
MySQL="/opt/local/bin/mysql5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 ######### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *.php; do file --mime $file; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://__www.old-site.com__', 'http://__www.new-site.com__') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://__www.old-site.com__','http://__www.new-site.com__'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://__www.old-site.com__', 'http://__www.new-site.com__'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first install 'selenium-webdriver'gem | |
require 'selenium-webdriver' | |
width = 800 | |
height = 600 | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to 'http://localhost:3000' | |
driver.execute_script %Q{ | |
window.resizeTo(#{width}, #{height}); | |
} | |
driver.save_screenshot('/tmp/screenshot.png') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /vagrant/sites | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
config.vm.forward_port 80, 8080 | |
config.vm.forward_port 3306, 8336 | |
config.vm.provision :puppet do |puppet| |
OlderNewer