Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]> 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
@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 / 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;
#!/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 / 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
# $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:
#

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:

# import json
import logging
import os
import shutil
import boto3
from datetime import timedelta
from cryptography import x509
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.hashes import SHA256
import unittest
from unittest.mock import MagicMock, patch
from datetime import timedelta
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from lambda_function import upload_secret
from lambda_function import write_cert
from lambda_function import create_cert
class TestUploadSecret(unittest.TestCase):
@fsultan
fsultan / gist:5fd50656b17f00672d0c86e192e9f5fa
Created July 12, 2024 19:52
solace statefulset export
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
meta.helm.sh/release-name: my-release
meta.helm.sh/release-namespace: default
creationTimestamp: "2024-07-12T19:32:43Z"
generation: 1
labels:
app.kubernetes.io/instance: my-release