This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sample implementation fo the CarQueryAPI Json database | |
*/ | |
class CarQueryAPI | |
{ | |
/** | |
* @var string Url to the CarQueryAPI database | |
*/ | |
protected $apiUrl = 'http://www.carqueryapi.com/api/0.3/?cmd='; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
p = 61 | |
q = 53 | |
n = p*q | |
phi = (p-1)*(q-1) | |
# Took from SO | |
def egcd(a, b): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Monday preceding the first post on this blog. Used for calculating week numbers | |
# (Weeks start on Mondays) | |
FIRST_MONDAY = date(2000, 2, 14) | |
# Calculate week_number and streak_weeks for every post, in order. For calculating today's | |
# streak, we only need to know about the most recent post, but there's a certain amount of | |
# looking at other posts to figure that out. | |
# Note: this code looks at *all* posts because I want to calculate all streaks. For just | |
# today's streak, a quicker algorithm would run in reverse chronological order and stop at | |
# the first break. |