Skip to content

Instantly share code, notes, and snippets.

View AbdullahiAbdulkabir's full-sized avatar
🏢
Working from home

Abdullahi Abdulkabir AbdullahiAbdulkabir

🏢
Working from home
View GitHub Profile
@abdulgaphy
abdulgaphy / infosec_newbie.md
Created December 14, 2018 07:46 — forked from mubix/infosec_newbie.md
How to start in Infosec
@vluzrmos
vluzrmos / paginate.php
Created July 20, 2016 14:31
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@MrAwesomeness
MrAwesomeness / Binary Search (Array)
Created April 7, 2015 22:03
Khan Academy Binary Search Challenge
/* Returns either the index of the location in the array,
or -1 if the array did not contain the targetValue */
var doSearch = function(array, targetValue) {
var min = 0;
var max = array.length - 1;
var guess;
var i = 1;
while (max >= min){
guess = Math.floor((max + min)/2);