Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focus

Oluwasegun Adeleye segunadeleye

🎯
Focus
View GitHub Profile
@segunadeleye
segunadeleye / merge_sort.py
Created Jul 13, 2019
An implementation of the merge sort algorithm in Python.
View merge_sort.py
'''
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 Jun 17, 2019 — forked from kyletcarlson/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…
View rspec_model_testing_template.rb
# 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 Aug 27, 2018 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.
View bash-colors.md

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 Aug 24, 2018
A script to move repositories from one github account to another one
View git-clone-push.sh
#!/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"
You can’t perform that action at this time.