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
# -*- coding: utf-8 -*- | |
import sys | |
from django.core.management.commands.runserver import Command as BaseCommand | |
class Command(BaseCommand): | |
def handle(self, addrport='', *args, **options): | |
sys.stdout = open('/dev/null', 'w') | |
sys.stderr = open('/dev/null', 'w') |
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
user nginx; | |
worker_processes 1; | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
% brew upgrade | |
==> Upgrading 2 outdated packages, with result: | |
git 1.7.8.2, readline 6.2.2 | |
==> Upgrading git | |
==> Downloading http://git-core.googlecode.com/files/git-1.7.8.2.tar.gz | |
File already downloaded in /Users/francisco.souza/Library/Caches/Homebrew | |
==> make prefix=/usr/local/Cellar/git/1.7.8.2 install | |
GIT_VERSION = 1.7.8.2 | |
* new build flags or prefix | |
* new link flags |
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
brew doctor | |
Unbrewed dylibs were found in /usr/local/lib. | |
If you didn't put them there on purpose they could cause problems when | |
building Homebrew formulae, and may need to be deleted. | |
Unexpected dylibs: | |
/usr/local/lib/libcharset.1.dylib | |
/usr/local/lib/libgmp.3.5.2.dylib | |
/usr/local/lib/libiconv.2.dylib |
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
#include <sys/types.h> | |
#include <sys/event.h> | |
#include <sys/time.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int | |
main(void) |
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/csh | |
setenv CLASSPATH "`pwd`/bin" | |
java br.com.andressa.main.Main |
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
package lxc | |
import ( | |
"bytes" | |
"os/exec" | |
) | |
func LxcCreate(containerName, config string) error { | |
if err := exec.Command("sudo", "lxc-start", "--daemon", "-n", containerName).Start(); err != nil { | |
return err |
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
type Person struct { | |
Name string | |
Age int | |
} | |
p := Person{Name: "andrews", Age: 1000} | |
Update(p, {"age": 27}) |
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/csh | |
foreach a (`ls | grep -E 'aula_[0-9]$'`) | |
set new_a=`echo $a | sed 's/aula_\([0-9]\)/aula_0\1/'` | |
mv $a $new_a | |
end |
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
# -*- coding: utf-8 -*- | |
import random | |
import sys | |
limpa_nl = lambda arq: [l.strip('\n') for l in arq.readlines()] | |
def main(): | |
if len(sys.argv) != 2: | |
print "Você deve informar o arquivo com inscritos!" |