Skip to content

Instantly share code, notes, and snippets.

View savex83's full-sized avatar

Save Patruno savex83

  • Modena - Italy
View GitHub Profile
@savex83
savex83 / fb_group_page_query.py
Created August 24, 2018 16:01 — forked from kstohr/fb_group_page_query.py
Facebook Graph API: Search for pages and groups that match a query list
import os
import traceback
import logging
import facebook
import requests
import pandas as pd
import json
import time
import numpy as np
from pandas.io.json import json_normalize
@savex83
savex83 / sysctl.conf
Created July 27, 2018 08:20 — forked from sokratisg/sysctl.conf
Tuned sysctl.conf for use by CentOS/RHEL 6.x or later
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Turn on execshield
# 0 completely disables ExecShield and Address Space Layout Randomization
# 1 enables them ONLY if the application bits for these protections are set to “enable”
# 2 enables them by default, except if the application bits are set to “disable”
# 3 enables them always, whatever the application bits
@savex83
savex83 / postfix-to-json.py
Created January 3, 2018 16:00
Postfix log parser to json, just queue-id, message-id and status with remote server response.
#!/usr/bin/env python
'''
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/ for more details.
'''
import re
@savex83
savex83 / git-backup-to-AWS-S3.sh
Created November 16, 2017 20:32 — forked from philippb/git-backup-to-AWS-S3.sh
Complete git repository backup script to AWS S3
#!/bin/bash
# Script to backup git repo to S3
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc
bucket=$GITHUB_BACKUP_BUCKET
dir=$GITHUB_BACKUP_DIR
password=$GITHUB_BACKUP_PASSWORD
account=$GITHUB_ACCOUNT