Skip to content

Instantly share code, notes, and snippets.

View shishirsharma's full-sized avatar
🤑
Focusing

Shishir Sharma shishirsharma

🤑
Focusing
View GitHub Profile
@emad
emad / slackmoon.py
Last active October 24, 2018 23:20
keep my slack status in phase with the moon
import urllib
import json
import datetime
def emoji_phase(t):
emoji = [
":new_moon:", ":waxing_crescent_moon:",
":first_quarter_moon:",
":waxing_gibbous_moon:",":full_moon:",
":waning_gibbous_moon:", ":last_quarter_moon:",
@fasiha
fasiha / no-hackerrank.md
Last active August 7, 2023 11:47
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: recruitment@EmployerABC.com
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

@tmilos
tmilos / README.md
Last active March 18, 2024 05:34
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@pelted
pelted / application_helper.rb
Created January 23, 2012 05:24 — forked from thatfunkymunki/application_helper.rb
Make will_paginate generate HTML that bootstrap.less will render nicely, fixed for will_paginate 3.0.2
# Based on https://gist.github.com/1205828, in turn based on https://gist.github.com/1182136
# Modified to work with Sinatra. WillPaginate uses LinkRender when used in Sinatra
class BootstrapLinkRenderer < LinkRenderer
protected
def html_container(html)
tag :div, tag(:ul, html), container_attributes
end