Skip to content

Instantly share code, notes, and snippets.

View mohamed-elsayed's full-sized avatar
🎯
Focusing

kandil mohamed-elsayed

🎯
Focusing
View GitHub Profile
@mohamed-elsayed
mohamed-elsayed / Stack_ArrayImplementation_OOP.cpp
Created November 18, 2015 16:34 — forked from mycodeschool/Stack_ArrayImplementation_OOP.cpp
An object oriented implementation of stack using arrays in C++.
// Stack - Object oriented implementation using arrays
#include <iostream>
using namespace std;
#define MAX_SIZE 101
class Stack
{
private:
int A[MAX_SIZE]; // array to store the stack
int top; // variable to mark the top index of stack.
@mohamed-elsayed
mohamed-elsayed / Stack_ArrayImplementation.C
Created November 18, 2015 16:34 — forked from mycodeschool/Stack_ArrayImplementation.C
This is a basic array based implementation of stack data structure in C.
// Stack - Array based implementation.
// Creating a stack of integers.
#include<stdio.h>
#define MAX_SIZE 101
int A[MAX_SIZE]; // integer array to store the stack
int top = -1; // variable to mark top of stack in array
// Push operation to insert an element on top of stack.
@mohamed-elsayed
mohamed-elsayed / bash-cheatsheet.sh
Created May 13, 2017 10:02 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@mohamed-elsayed
mohamed-elsayed / flexlm
Created December 20, 2020 21:21 — forked from jumanjiman/flexlm
init script for flexlm
#!/bin/bash
#
# /etc/rc.d/init.d/flexlm
#
# Manage the Intel license server
#
# chkconfig: 2345 90 10
# description: Start or stop the Intel flex license manager
# There are two daemons: the master and the vendor.
@mohamed-elsayed
mohamed-elsayed / Instructions.md
Created December 20, 2020 21:34 — forked from kalebo/Instructions.md
Instructions on setting up a FlexLM daemon for SystemD

Setting up a FlexLM service for SystemD

Create directory structure

  1. Create the directory for the flexlm user to use, e.g., /opt/flexlm
  2. Place all the binaries for the licence manager and the licence in a vendor specific subdirectory

At this point you should have something similar to following directory structure:

/opt/flexlm/
└── VENDOR
@mohamed-elsayed
mohamed-elsayed / systemd_service_hardening.md
Created December 22, 2020 09:39 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict