Skip to content

Instantly share code, notes, and snippets.

View mrprompt's full-sized avatar
:octocat:
I may be slow to respond.

Thiago Paes mrprompt

:octocat:
I may be slow to respond.
View GitHub Profile
@mrprompt
mrprompt / .vimrc
Last active December 15, 2016 22:20
Meu .vimrc
""" Configurações iniciais
set nocompatible " Must come first because it changes other options.
filetype off " Necessary on some Linux distros for pathogen to properly load bundles
" Habilitando o Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
@mrprompt
mrprompt / apc.ini
Created June 7, 2013 03:42
PHP APC Extension config
; Enable apc extension module
extension = apc.so
; Options for the APC module version >= 3.1.3
; See http://www.php.net/manual/en/apc.configuration.php
; This can be set to 0 to disable APC.
apc.enabled=1
; The number of shared memory segments to allocate for the compiler cache.
apc.shm_segments=1
@mrprompt
mrprompt / build.xml
Created June 7, 2013 03:41
Script de build para Phing
<?xml version="1.0" encoding="UTF-8"?>
<project name="Software" default="build" basedir=".">
<tstamp/>
<property name="application.library" value="${project.basedir}/library"/>
<property name="application.tests" value="${project.basedir}/tests"/>
<property name="application.builddir" value="${project.basedir}/build"/>
<property name="ftp.host" value="" />
@mrprompt
mrprompt / rotate.rules.iptables
Created June 7, 2013 03:40
Alterna entre IPs
#!/bin/sh
iptables -t nat -F
iptables -t nat -A POSTROUTING -s 201.33.19.171 -j SNAT --to-source 201.33.19.177-201.33.19.178
#!/bin/sh
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.171
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.177
iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 -j SNAT --to-source 201.33.19.178
; Enable xdebug extension module
zend_extension=/usr/lib64/php/modules/xdebug.so
; ativado por padrão
xdebug.default_enable = 1
; iniciar automaticamente
xdebug.auto_start = 1
; ativa a depuração remota de scripts (mas os torna mais lentos)
@mrprompt
mrprompt / db_status.sql
Created June 7, 2013 03:37
Get de Database Status with a procedure - MySQL
DELIMITER $$
CREATE PROCEDURE `db_status`(dbname varchar(50))
begin
(
select
TABLE_NAME as `Table Name`,
ENGINE as `Engine`,
TABLE_ROWS as `Rows`,
@mrprompt
mrprompt / array_to_xml.php
Created June 7, 2013 03:35
Array para XML
<?php
/**
* Transforma um array em xml
*/
$test_array = array (
'bla' => 'blub',
'foo' => 'bar',
'another_array' => array (
'stack' => 'overflow',
),
@mrprompt
mrprompt / php-gtk-prototypes.php
Created June 7, 2013 03:30
PHP-GTK skeletons, generated from the extension using Gtk_Dumper.php
<?php
/**
* PHP-GTK skeletons, generated from the extension using:
* $Id$
*
* Name : php-gtk
* Version : 2.0.0-dev
* INI entries : 2
* - php-gtk.codepage = CP1250
* - php-gtk.extensions = php_gtk_libglade2.dll,php_gtk_sourceview2.dll
@mrprompt
mrprompt / Gtk_Dumper.php
Created June 7, 2013 03:26
Geração do arquivo para auto complete do PHP-GTK+
<?php
/**
* PHP-GTK Stub generator
*
* This program can be run on any system with PHP-GTK installed.
* It generates a skeleton file containing all classes present
* in the currently active PHP-GTK extension, with their
* constants, methods, and signatures thereof.
*
* This file can be installed on various IDEs to enable code