Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jabari Dash N02870941

🎯
Focusing
Block or report user

Report or block N02870941

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@N02870941
N02870941 / Timsort
Created May 1, 2018 — forked from nandajavarma/Timsort
Timsort implementation using Python
View Timsort
#!/usr/lib/python
# -*- coding: utf-8 -*-
#
# This is a re-implementation of Python's timsort in Python
# itself. This is purely for learning purposes. :)
# References: [
# https://en.wikipedia.org/wiki/Timsort,
# http://wiki.c2.com/?TimSort
# ]
#
@N02870941
N02870941 / back_forward.js
Created Dec 13, 2017 — forked from sstephenson/back_forward.js
How to detect whether a hash change came from the Back or Forward button
View back_forward.js
var detectBackOrForward = function(onBack, onForward) {
hashHistory = [window.location.hash];
historyLength = window.history.length;
return function() {
var hash = window.location.hash, length = window.history.length;
if (hashHistory.length && historyLength == length) {
if (hashHistory[hashHistory.length - 2] == hash) {
hashHistory = hashHistory.slice(0, -1);
onBack();
You can’t perform that action at this time.