Skip to content

Instantly share code, notes, and snippets.

View filipecifali's full-sized avatar

Filipe Cifali Stangler filipecifali

  • Porto Alegre / RS / Brasil
  • 18:20 (UTC -03:00)
View GitHub Profile
@JuniorLima
JuniorLima / projeto.wsgi
Created June 28, 2013 15:15
WSGI Kinghost
import os
import sys
import site
# Calculates the path based on location of WSGI script.
apache_configuration = os.path.realpath(os.path.dirname(__file__))
project = os.path.join(apache_configuration, 'nomedoproto')
sys.path.append(apache_configuration)
sys.path.append(project)
@llamerr
llamerr / file_put_contents
Last active November 6, 2017 16:54
file_put_contents for perl
sub file_put_contents {
my $fh;
open($fh, '>>', "/some/path/file.txt") or die "Couldn't open: $!";
print $fh "\n";
print $fh @_[0];
print $fh @_[1];
close $fh;
}
file_put_contents("1:","new");
use Data::Dumper;
@superbrothers
superbrothers / ansi-color.php
Created August 23, 2012 01:49
ANSI color terminal output module for php
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";