Skip to content

Instantly share code, notes, and snippets.

View nielsonsantana's full-sized avatar

Nielson Santana nielsonsantana

View GitHub Profile
@nielsonsantana
nielsonsantana / redis.conf
Last active February 15, 2017 21:06 — forked from ehazlett/redis.conf
Redis supervisor config
[program:redis]
command=/usr/bin/redis-server /etc/redis/redis.conf
user=root
autostart=true
autorestart=true
stdout_logfile=/var/log/redis/stdout.log
stderr_logfile=/var/log/redis/stderr.log
stopsignal=QUIT
@nielsonsantana
nielsonsantana / test_connection_elasticsearch.py
Created September 2, 2015 04:28
Verificando conexão com o ElasticSearch
from elasticsearch import Elasticsearch, RequestsHttpConnection
es = Elasticsearch(['domain:port'], connection_class=RequestsHttpConnection,
http_auth=('username', 'password'),
use_ssl=False, verify_certs=False)
es.info()
"""
The MIT License (MIT)
Copyright (c) 2011 Numan Sachwani
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@nielsonsantana
nielsonsantana / robot.js
Created December 10, 2012 02:03
Zolmeister
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){
@nielsonsantana
nielsonsantana / robot.js
Created December 1, 2012 18:42
nasbot1
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
var parameter = {
"rede" : {
"rede1" : {
"switch" : {
"switch1" : ["pc1", "pc2"]
},
"pc" : {
"pc1" : {
"ip" : "10.0.0.100",
"mac" : "",