Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Igor Elias igoreliasm

🎯
Focusing
Block or report user

Report or block igoreliasm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:bcdf6da9ad3c6f3d33d5
#!/bin/sh
# /etc/rc.local
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# Proxy transparent
View gist:6329b79909679ba745b2
#!/bin/sh
# $Id: rc.redhat.asterisk 226815 2009-11-02 17:17:10Z tilghman $
#
# asterisk Starts, Stops and Reloads Asterisk.
#
# chkconfig: 2345 90 60
# description: Asterisk PBX and telephony daemon.
# processname: asterisk
# pidfile: /var/run/asterisk.pid
#
View gist:67b6db1783f5ca4d3f39
yum install vim postgresql* wget kernel-dev* kernel-headers* gcc gcc-c++ libxml2* sox jwhois python-psycopg2.x86_64 ntp.x86_64 dialog iptraf pciutils libtermcap-devel ntsysv mutt epel-release -y
View gist:9d193f3ed01a1a85ce20
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
exclude=postgresql-*
View gist:4a9bb13537b17494a7d3
#!/bin/sh
#
# /etc/init.d/kibana -- startup script for kibana
# Wolfyxvf 2015-04-16; used httpd init script as template
#
### BEGIN INIT INFO
# Provides: kibana
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts kibana
@igoreliasm
igoreliasm / gist:84e274aa4b0f67e7c54d
Created May 20, 2015
nginx for elastichsearch and kibana
View gist:84e274aa4b0f67e7c54d
#
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
View gist:6c2afc5868091044cac8
var testeObj3 = {
prop1 : 1,
prop2 : 2
};
// criando objeto que tera como protoripo testeObj3
var proto = Object.create(testeObj3)
// definindo propriedades proprias
proto.prop3 = 3;
proto.prop4 = 4;
View gist:7a44b3447cc8a9292ae7
var testeObj2 = {
prop1 : 1,
prop2 : 2,
prop3 : 3
};
// true pois testeObj2 tem uma propriedade propria prop1
var result1 = testeObj2.hasOwnProperty("prop1");
// false pois testeObj2 não tem uma propriedade própria prop0
var result2 = testeObj2.hasOwnProperty("prop0");
View gist:9f3320aa39859a443149
// criando o objeto para teste.
var testeObj = {
prop1 : 1,
prop2 : 2,
prop3 : 3
};
//verificando
var result1 = "prop2" in testeObj; // true pois testeObj tem uma propriedade propria 'prop2'
var result2 = "prop4" in testeObj; // false pois testeObj não tem propriedade propria 'prop4'
View gist:50e670f8369127d488a5
// criando o primeiro objeto que herdam de Object.prototype
var obj1 = {};
obj1.x = 1; // própriedade própria
// segundo objeto herdando de Object.prototype e obj1
var obj2 = Object.create(obj1);
// terceiro objeto
var obj3 = Object.create(obj2);
You can’t perform that action at this time.