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
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
[supervisord] | |
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
logfile_backups=10 ; (num of main logfile rotation backups;default 10) | |
loglevel=info ; (log level;default info; others: debug,warn,trace) | |
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
nodaemon=false ; (start in foreground if true;default false) | |
minfds=1024 ; (min. avail startup file descriptors;default 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
import sys | |
from fabric.colors import green, yellow | |
from fabric.contrib.console import confirm | |
from fabric.context_managers import cd, prefix | |
from fabric.operations import prompt | |
from fabric.api import run, local, env, sudo | |
env.user = 'ubuntu' | |
env.hosts = ['0.0.0.0'] #ip do ec2 | |
env.app_path = '/home/seu-usuario-do-ec2/bomgusto' |
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
# Enable us to call scrapy from manage.py | |
from __future__ import absolute_import | |
from django.core.management.base import BaseCommand | |
class Command(BaseCommand): | |
def run_from_argv(self, argv): | |
self._argv = argv | |
self.execute() |
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
Show hidden characters
/* | |
SublimeLinter default settings | |
*/ | |
{ | |
/* | |
Sets the mode in which SublimeLinter runs: | |
true - Linting occurs in the background as you type (the default). | |
false - Linting only occurs when you initiate it. | |
"load-save" - Linting occurs only when a file is loaded and saved. |
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 -*- | |
from django.views.generic import ListView | |
class SortableListView(ListView): | |
allowed_sort_fields = () | |
sort_default = None | |
sort_key = 'sort' | |
sort_field_splitter = '-' | |
sort_ascending_postfix = 'up' | |
sort_descending_postfix = 'down' |
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
d = {192: u'A', 193: u'A', 194: u'A', 195: u'A', 196: u'A', 197: u'A', | |
199: u'C', 200: u'E', 201: u'E', 202: u'E', 203: u'E', 204: u'I', | |
205: u'I', 206: u'I', 207: u'I', 209: u'N', 210: u'O', 211: u'O', | |
212: u'O', 213: u'O', 214: u'O', 216: u'O', 217: u'U', 218: u'U', | |
219: u'U', 220: u'U', 221: u'Y', 224: u'a', 225: u'a', 226: u'a', | |
227: u'a', 228: u'a', 229: u'a', 231: u'c', 232: u'e', 233: u'e', | |
234: u'e', 235: u'e', 236: u'i', 237: u'i', 238: u'i', 239: u'i', | |
241: u'n', 242: u'o', 243: u'o', 244: u'o', 245: u'o', 246: u'o', | |
248: u'o', 249: u'u', 250: u'u', 251: u'u', 252: u'u', 253: u'y', |
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
/* | |
* A rather simple way of testing out SwampDragon. | |
* Create a load of connections, connect, subscriber, update and count the number | |
* of published messages. | |
* | |
* SETUP: | |
* 1. npm install sockjs-client-node | |
* 2. curl https://raw.githubusercontent.com/jonashagstedt/swampdragon/master/swampdragon/static/swampdragon/js/swampdragon.js > swampdragon.js | |
* 3. Set router_name to the name of your router. | |
* 4. Change "sd.update_object(router_name, { value: val }, 'foo');" to call |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Script Send Mail Nagios (send_mail.py) | |
Copyrighted by Nilton OS <jniltinho at gmail.com> | |
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) | |
Version: 0.1 | |
Put this script in Nagios plugins folder |
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
def test_login_page(self): | |
""" | |
Test Login Page | |
""" | |
response = self.client.get(reverse("login")) | |
self.assertEqual(response.status_code, 200) | |
# Usuário não existe | |
response = self.client.post(reverse("login"), {'username': 'unknown', 'password': 'doesnotexist'}) | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |