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
echo '#================================================================================================================' | |
echo '# Corrigir a vizualizacao da interface do yast no putty ' | |
echo '#================================================================================================================' | |
echo "export NCURSES_NO_UTF8_ACS=1" >> /etc/bash.bashrc.local | |
echo '#================================================================================================================' | |
echo '# Pacotes basicos: ' | |
echo '#================================================================================================================' | |
zypper --non-interactive install git nmap mc htop |
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
@echo OFF | |
; dependencias: 7-zip, curl | |
rem * ******************************************************************* | |
rem * pg_backup.cmd - PostgresSQL Backup and copy FTP * | |
rem * * | |
rem * Author: Renato Assis * | |
rem * ******************************************************************* | |
set DATESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2% | |
set TIMESTAMP=%TIME:~0,2%%TIME:~3,2%%TIME:~6,2% |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>GitHub</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
server { | |
listen 80; | |
server_name app.com.br; | |
client_max_body_size 20M; | |
location / { | |
uwsgi_param Host $host; | |
uwsgi_param X-Real-IP $remote_addr; |
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
[uwsgi] | |
uid=www-data | |
gid=www-data | |
vhost=true | |
virtualenv=/webapps/www/app/ | |
socket=127.0.0.1:9000 | |
master = true | |
thread=5 | |
master=2 | |
#path to manage.py |
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/bash | |
NAME="app" # Name of the application | |
DJANGODIR=/webapps/app/ # Django project directory | |
USER=jonhdoe # the user to run as | |
GROUP=jonhdoe # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_WSGI_MODULE=app.wsgi # WSGI module name | |
echo "Starting $NAME" |
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
SELECT | |
[s_tst].[session_id], | |
[s_es].[login_name] AS [Login Name], | |
DB_NAME (s_tdt.database_id) AS [Database], | |
[s_tdt].[database_transaction_begin_time] AS [Begin Time], | |
[s_tdt].[database_transaction_log_bytes_used] AS [Log Bytes], | |
[s_tdt].[database_transaction_log_bytes_reserved] AS [Log Rsvd], | |
[s_est].text AS [Last T-SQL Text], | |
[s_eqp].[query_plan] AS [Last Plan] | |
FROM |
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
SELECT T.name 'COM PK' | |
FROM SYS.Tables T | |
WHERE OBJECTPROPERTY(object_id,'TableHasPrimaryKey') = 1 -- 1 or 0 | |
AND type = 'U' |
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
class SeuAdmin(BaseAdmin): | |
def get_tags(self, obj): | |
return ",\n".join([s.name for s in obj.tags.all()]) | |
list_display = ('categoria', 'produto', 'slug', 'descricao', 'foto', 'get_tags') | |
get_tags.short_description = 'Tags' |
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 SocketServer | |
import SimpleHTTPServer | |
PORT = 5000 | |
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler | |
httpd = SocketServer.TCPServer(("", PORT), Handler) | |
print("Running in port: ", PORT) | |
httpd.serve_forever() |
OlderNewer