Skip to content

Instantly share code, notes, and snippets.

View mrprompt's full-sized avatar
🏠
Working from home

Thiago Paes mrprompt

🏠
Working from home
View GitHub Profile
@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
@mrprompt
mrprompt / firewall.rules
Created February 15, 2013 13:39
Firewall
# Completed on Thu Jul 9 00:50:55 2009
# Generated by iptables-save v1.4.1.1 on Thu Jul 9 00:50:55 2009
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -i ! lo -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i ! lo -p tcp -m state --state NEW -m tcp --dport 10000 -j ACCEPT