Skip to content

Instantly share code, notes, and snippets.

View clement006's full-sized avatar

Clément Noterdaem clement006

View GitHub Profile
<?php
// Zeuxis Lo
// Created at 2011-03-23 05:05 PM
date_default_timezone_set("Asia/Hong_Kong");
function calculate_rank_sum($score, $created_at) {
$order = log10(max(abs($score), 1));
if ($score > 0) {
<?php
/**
* Formats string, removes accents from string
* @param string $string String to format
* @return string
*/
function strip_accent($string)
{
$accents = '/&([A-Za-z]{1,2})(grave|acute|circ|cedil|uml|lig);/';