Skip to content

Instantly share code, notes, and snippets.

import unittest
from unittest.mock import patch, MagicMock
import os
import subprocess
from neo4j_backup import perform_backup
class TestPerformBackup(unittest.TestCase):
@patch('subprocess.check_output')
@patch('os.path.getsize')
import os
import subprocess
import boto3
def perform_backup():
compress = os.getenv("COMPRESS", "true")
keep_failed = os.getenv("KEEP_FAILED", "true")
to_path = os.getenv("TO_PATH", "/path/to/backup")
backup_type = os.getenv("BACKUP_TYPE", "full")
neo4j_host = os.getenv("NEO4J_HOST", "localhost")

Keybase proof

I hereby claim:

  • I am fsultan on github.
  • I am fahdsultan (https://keybase.io/fahdsultan) on keybase.
  • I have a public key ASB0UqcNnvKsAe1xY-4eANWeveYoHLKYPk3cVC3hcJYqiQo

To claim this, I am signing this object:

#!/bin/bash
# $Id: ldap_ssh_key.sh 138 2013-09-14 08:24:39Z jmorano $
#
# Check if the user is in the right group
# and afterwards retrieve the SSH public key from LDAP
# Logs directly in Syslog
#
#
# sshd_config for OpenSSH 6.2 or higher:
#
@fsultan
fsultan / Attlassian_Jira_Confluence-GreenonBlack-Stylist.css
Last active August 29, 2015 14:05
Attlassian Jira/Confluence Green on Black Stylist CSS
.body {
background-color: black !important;
}
#summary-val, .issue-body-content, .command-bar, .toggle-title, html, body, p, div, h1, h2, h3, h4, h5, h6, img, pre, form, fieldset, .inactive, .activity-item-description blockquote, #issuetable>tbody>tr, #issuetable>tfoot>tr, .saved-search-selector{
background-color: black !important;
color: #00A400 !important;
}
.aui-badge, .aui-toolbar .toolbar-group .toolbar-trigger, .aui-toolbar .aui-dd-parent .aui-dd-trigger, .lozenge, .jira-feedback-link , #footer-comment-button, .ghx-label-9{
#!/bin/bash
# As root ( via `sudo su -` ):
# Initialize ephemeral storage
curl https://gist.githubusercontent.com/fsultan/9936494/raw/ephemeral > /etc/init.d/ephemeral
chmod +x /etc/init.d/ephemeral
ln -s ../init.d/ephemeral /etc/rcS.d/S10ephemeral
/etc/init.d/ephemeral
ln -s /mnt/jenkins /var/jenkins
#ln -s /mnt/mongodb /var/lib/mongodb
@fsultan
fsultan / hadoop_solarized_dark
Created December 30, 2013 17:19
Stylist theme for Hadoop pages based on Solarized - Dark.
/*
$base03: #002b36;
$base02: #073642;
$base01: #586e75;
$base00: #657b83;
$base0: #839496;
$base1: #93a1a1;
$base2: #eee8d5;
$base3: #fdf6e3;
$yellow: #b58900;
@fsultan
fsultan / security-group-cleanup.py
Created September 4, 2012 17:38 — forked from miketheman/security-group-cleanup.py
AWS EC2 Unused Security Group cleanup
#!/usr/bin/env python
import sys
import boto
import pprint
del_flag = ''
if len(sys.argv) > 1:
del_flag = sys.argv[1]
@fsultan
fsultan / bb-openldap.pl
Created July 8, 2012 18:07
Script to monitor OpenLDAP performance and sync-replication status via Hobbit
#!/usr/bin/perl
# Buchan Milne <bgmilne@mandriva.org> 20051213
# Script to monitor OpenLDAP performance and sync-replication status via
# Hobbit (may also still work with BigBrother).
#
# 1)Install Net::LDAP (perl-ldap) and Date::Manip (perl-DateManip)
# 2)Run as task from hobbitserver.cfg (or BBEXT in bbdef.sh for BigBrother)
# 3)Use ncv in hobbit to collect data:
# -add "ol=ncv" to TEST2RRD, and "ncv" to GRAPHS in hobbitserver.cfg