Skip to content

Instantly share code, notes, and snippets.

View danilochilene's full-sized avatar

Danilo Chilene danilochilene

View GitHub Profile
@floer32
floer32 / centos_cx_Oracle
Last active January 6, 2020 23:29
CentOS 6: Set up Oracle Instant Client and Python package cx_Oracle
#!/bin/bash
# INSTALL ORACLE INSTANT CLIENT #
#################################
# NOTE: Oracle requires at least 1176 MB of swap (or something around there).
# If you are using CentOS in a VMWare VM, there's a good chance that you don't have enough by default.
# If this describes you and you need to add more swap, see the
# "Adding a Swap File to a CentOS System" section, here:
# http://www.techotopia.com/index.php/Adding_and_Managing_CentOS_Swap_Space
@stevenleeg
stevenleeg / pie.coffee
Last active March 11, 2023 09:23
A simple d3 pie chart widget for Dashing.
class Dashing.Pie extends Dashing.Widget
@accessor 'value'
onData: (data) ->
@render(data.value)
render: (data) ->
if(!data)
data = @get("value")
if(!data)
@willjohnson
willjohnson / README.md
Last active April 26, 2022 19:32
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage

@crashdump
crashdump / Template CouchDB.xml
Last active February 28, 2024 15:04
CouchDB / BigCouch - Zabbix Monitoring
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-12-03T16:57:07Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@robertmarsal
robertmarsal / README.md
Last active March 20, 2022 02:26 — forked from mtowers/README.md
Google Analytics Real Time Visitors Widget for Dashing with OAuth2 Authentication
@danilochilene
danilochilene / gist:c8571b23b2caa0df70c7
Last active August 29, 2015 14:06
Kernel 3.x on CentOS 6.5
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
yum update
yum --enablerepo=elrepo-kernel install -y kernel-lt
sed -i 's/default=1/default=0/' /etc/grub.conf
reboot
@keeth
keeth / gist:a58afe01b31f431aa878
Last active April 6, 2016 02:05
Install pygit2 0.22.0 on a minimal Ubuntu Trusty
apt-get install -y pkg-config python-pip git libssl-dev zlib1g-dev cmake python-dev libffi-dev libssh2-1-dev
git clone https://github.com/libgit2/libgit2 \
&& cd libgit2 \
&& git checkout tags/v0.22.0 \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
&& cmake --build . --target install \
&& cd ../..
@cdfpaz
cdfpaz / greeks.cpp
Created October 5, 2015 17:08
Calculating the greeks
#include <stdio.h>
#include <math.h>
const double Pi = 3.14159265359;
// Standard Normal probability density function
// Normal PDF(x) = exp(-x*x/2)/{sigma * sqrt(2 * Pi) }
double Normal_PDF(const double & x) {
return (1.0/(double)pow(2 * Pi, 0.5)) * exp(-0.5 * x * x);
}
@danilochilene
danilochilene / write_metrics.py
Created December 1, 2015 20:31
Write data to InfluxDB
from influxdb import InfluxDBClient
import random
from time import sleep
import sys
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'metrics')
x = 0
while True:
@abraithwaite
abraithwaite / config.go
Created March 15, 2017 03:03
Awesome way to do configuration in go. Taken from https://github.com/influxdata/telegraf
package main
import (
"io/ioutil"
"log"
"github.com/naoina/toml"
"github.com/naoina/toml/ast"
)