Skip to content

Instantly share code, notes, and snippets.

View nielsonsantana's full-sized avatar

Nielson Santana nielsonsantana

View GitHub Profile
var parameter = {
"rede" : {
"rede1" : {
"switch" : {
"switch1" : ["pc1", "pc2"]
},
"pc" : {
"pc1" : {
"ip" : "10.0.0.100",
"mac" : "",
@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);
@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 ){
"""
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 / 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()
@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 / install-comodo-ssl-cert-for-nginx.rst
Created March 6, 2016 17:42 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@nielsonsantana
nielsonsantana / gist:623add98aa8e52076cbf
Created March 13, 2016 05:08
output after run 'DOKKU_TRACE=1 dokku cleanup'
+ [[ -f /home/dokku/dokkurc ]]
+ [[ -d /home/dokku/.dokkurc ]]
+ [[ -n 1 ]]
+ set -x
+ parse_args cleanup
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ cleanup =~ ^--.* ]]
@nielsonsantana
nielsonsantana / gist:6d7e2a172d532df8d7b6
Last active March 13, 2016 06:17
Dokku can't remove old images,
Description of problem:
The dokku can't remove old images, then my HD have a little space available.
Output of the following commands
- `uname -a`:
Linux genomika-dokku-staging 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
@nielsonsantana
nielsonsantana / dockerenter.sh
Last active July 5, 2022 13:35
Docker Shortcut to singin on docker container by name
#!/bin/bash
DOCKER_PS_LINE=`docker ps | awk '{print $1,$2,$NF}' | grep -m 1 $1`
CONTAINER_NAME=`echo $DOCKER_PS_LINE | awk '{print $2}'`
CONTAINER_ID=`echo $DOCKER_PS_LINE | awk '{print $1}'`
if [ -n "$CONTAINER_ID" ]; then
echo "Logged in: $CONTAINER_NAME"
docker exec -it $CONTAINER_ID bash
else
echo "No container found for query: '$1'"