Skip to content

Instantly share code, notes, and snippets.

View nicolasenno's full-sized avatar

Nicola Senno nicolasenno

View GitHub Profile
@nicolasenno
nicolasenno / nci
Last active December 2, 2018 15:54
NCI test
## Disable ipv6
```sh
sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
```
## Java alternatives
```sh
@nicolasenno
nicolasenno / maas_api_post.py
Last active September 27, 2017 15:26
MAAS API example: POST
import json
from requests import Request, Session
from requests_oauthlib import OAuth1
# <consumer_key>:<token_key>:<token_secret>
# xxxxxxxxxxxxxx:yyyyyyyyyyy:zzzzzzzzzzzzzz
auth1 = OAuth1(u'xxxxxxxxxxxxxx', u'',
u'yyyyyyyyyyy', u'zzzzzzzzzzzzzz')
@nicolasenno
nicolasenno / graphite.md
Last active October 9, 2016 10:14 — forked from kgadek/graphite.md
graphite

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.0.tar.gz
tar zxvf collectd-5.4.0.tar.gz
@nicolasenno
nicolasenno / apache_rewrite
Created December 6, 2013 15:01
Apache disable bot rewrite 80legs
# block user agents from site access
RewriteCond %{HTTP_USER_AGENT} .*(80legs) [NC]
RewriteRule ^(.*)$ - [F]