Skip to content

Instantly share code, notes, and snippets.

View aizuddin85's full-sized avatar
🎯
Focusing

Aizuddin Zali aizuddin85

🎯
Focusing
View GitHub Profile
@aizuddin85
aizuddin85 / gce_messages.log
Last active September 29, 2017 15:33
gce_openshift_origin_IP_conflict
This file has been truncated, but you can view the full file.
Sep 29 15:13:44 master systemd: Created slice User Slice of root.
Sep 29 15:13:44 master systemd: Starting User Slice of root.
Sep 29 15:13:44 master systemd: Started Session 12 of user root.
Sep 29 15:13:44 master systemd-logind: New session 12 of user root.
Sep 29 15:13:44 master systemd: Starting Session 12 of user root.
Sep 29 15:13:44 master ansible-setup: Invoked with filter=* gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10
Sep 29 15:13:46 master ansible-setup: Invoked with filter=* gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10
Sep 29 15:13:48 master ansible-stat: Invoked with checksum_algorithm=sha1 get_checksum=True follow=False path=/run/ostree-booted get_md5=True get_mime=True get_attributes=True
Sep 29 15:13:49 master ansible-yum: Invoked with name=['iproute'] list=None install_repoquery=True conf_file=None disable_gpg_check=False state=present disablerepo=None update_cache=False enablerepo=None exclude=None validate_certs=True installroot=/ skip_brok
@aizuddin85
aizuddin85 / gist:a33bccc4824f0f4c006b4d05e5370a30
Created September 15, 2017 07:16
Proof Of Concept: Openstack on Libvirt
# Hardware
@aizuddin85
aizuddin85 / complex_ldap_query.py
Created September 21, 2016 06:39 — forked from futureimperfect/complex_ldap_query.py
Complex LDAP Queries with python-ldap
import ldap
import sys
LDAP_URI = 'ldap://ldap.example.com'
SEARCH_BASE = 'ou=Example,dc=example,dc=com'
QUERY = '(&(nickname=M*)(employeeType=fulltime)(|(!(departmentNumber=5*))(loginShell=/bin/bash)))'
def ldap_search(ldap_uri, base, query):
'''
@aizuddin85
aizuddin85 / OracleWrapper.py
Created September 26, 2015 18:19 — forked from cemremengu/OracleWrapper.py
cx_Oracle Wrapper
import cx_Oracle
class OracleWrapper(object):
"""
A class for handling db operations
"""
def __init__(self, constring):
self.constring = constring.strip()
self.db_connection = cx_Oracle.connect(constring)
#!/usr/bin/python
import re
file = open("/var/log/messages", 'r')
for i in file.readlines():
if re.search('Python', i):
print i
file.close()
#!/usr/bin/python
load = open("/proc/loadavg",'r')
read = load.read(4)
int = str(read)
print int
#print read
if int > "2.00":
print "Load is high"