Skip to content

Instantly share code, notes, and snippets.

View segunadeleye's full-sized avatar
🎯
Focus

Oluwasegun Adeleye segunadeleye

🎯
Focus
View GitHub Profile
@segunadeleye
segunadeleye / merge_sort.py
Created July 13, 2019 22:34
An implementation of the merge sort algorithm in Python.
'''
The merge sort algorithm has a time complexity of O(nlogn).
It is an implementation of a Divide and Conquer rule.
'''
def mergeSort(array):
n = len(array)
if n == 1:
return array
@segunadeleye
segunadeleye / rspec_model_testing_template.rb
Created June 17, 2019 13:01 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@segunadeleye
segunadeleye / bash-colors.md
Created August 27, 2018 08:34 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@segunadeleye
segunadeleye / git-clone-push.sh
Last active August 24, 2018 22:44
A script to move repositories from one github account to another one
#!/bin/bash
echo "Initializing cloning for segun-adeleye/$1"
git clone git@github.com:segun-adeleye/$1.git
echo "segun-adeleye/$1 cloned"
echo
echo "Initializing creation of segunadeleye/$1 on github"