Skip to content

Instantly share code, notes, and snippets.

View abdellani's full-sized avatar
🎯
Focusing

Mohamed ABDELLANI abdellani

🎯
Focusing
View GitHub Profile
@abdellani
abdellani / linuxprivchecker.py
Created October 18, 2018 09:58 — forked from sh1n0b1/linuxprivchecker.py
linuxprivchecker.py -- a Linux Privilege Escalation Check Script
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.
@javascript
Scenario: Creating a weekly event with a different time-zone
Given the date is "2019-05-19"
Given I fill in event field:
| name | value |
| Name | Daily Standup |
| Start Date | 2019-05-19 |
| Start Time | 00:30 |
| Description | we stand up |
And I select "Algiers" from the time zone dropdown
{
"event":{
"name": "'Katherine Johnson' Scrum and Pair Hookup - All Welcome :-) Discuss Any Project, Ask Any Question, Or Just Listen In :-)",
"category": "Scrum",
"description": "'Katherine Johnson' Scrum - for coordination of AgileVentures projects and PairProgramming hookups. This Scrum is named in honour of Katherine Johnson, is an African-American mathematician whose calculations of orbital mechanics as a NASA employee were critical to the success of the first and subsequent U.S. manned spaceflights.<br/><br/> Please join and discuss any project, ask any question<br/><br/> Current Scrum masters: Sam Joseph and Matt Rider<br/><br/>",
"id": 2528,
"repeats": "daily",
"repeats_every_n_weeks": 1,
"repeats_weekly_each_days_of_the_week_mask": 64,
"repeat_ends": false,
def check_cycle(graph,node,connected)
counter =0
return false if graph[node].nil?
graph[node].each do |element|
if connected.include?(element)
counter +=1
return true if counter ==2
else
connected<< element
def getNext (x,y,map)
col=map.first.length
row=map.length
max=map[x][y]
next_cell=[x,y]
if 0<x and map[x-1][y]> max
max=map[x-1][y]
next_cell=[x-1,y]
end
def getNext(x,y,maze)
rows=maze.length
cols=maze.first.length
next_node=[]
next_node<<[x+1,y]if x<cols-1 && maze[x+1][y]!=1
next_node<<[x,y+1]if y<rows-1 && maze[x][y+1]!=1
next_node
end
def search_path(x,y,maze,path)
return path if maze[x][y]==9
require 'set'
def find_duplicates(array)
# write your code here
result=[]
set=Set[]
array.each do |element|
if !set.include?(element)
set.add(element)
else
@abdellani
abdellani / 6.6.rb
Last active October 24, 2019 16:33
def find_pairs(array, k)
# write your code here
result=[]
array.each_with_index do |element,index|
result<<[element,k-element] if array[index+1..-1].include?(k-element)
end
result
end
def getIndex(string)
string.split(" ").first.to_i
end
def getString(string)
string.split(" ").last
end
def fms(array)
return array if array.length==1
first_subarray_limit=(array.length.to_f/2).floor
def asq(array,start,last_element_index)
counter=0
return counter if start>=last_element_index
left=start
while left <last_element_index
if array[left]> array[last_element_index]
i=left+1
exachange=false