Skip to content

Instantly share code, notes, and snippets.

@seebz
seebz / HTML5 - seebz.txt
Created March 11, 2016 20:24
Modern WiiBackupManager export template
[Config]
Display name = HTML5
Author = Seebz
File extention = html
[File header]
<!doctype html>
<html lang="en">
<head>
@seebz
seebz / moo.php
Last active May 2, 2019 10:44
moo.php
<?php
/* ######################################################################
Here be cows – but: Never ask, never tell
##################################################################### */
abstract class Moo
{
public static function getMooLine($quiet = false)
@seebz
seebz / pretty.js
Last active August 29, 2015 14:08
JavaScript Pretty Date
/*
* JavaScript Pretty Date
* Copyright (c) 2011 John Resig (ejohn.org)
* Licensed under the MIT and GPL licenses.
*
* http://ejohn.org/blog/javascript-pretty-date/
*/
// Takes an ISO time and returns a string representing how
// long ago the date represents.
<?php
class SuperObject implements ArrayAccess, Countable
{
/**
* @param array
*/
public function __construct(array $data = array())
{
foreach ($data as $k => $v) {
@seebz
seebz / String.removeAccent.js
Last active August 29, 2015 14:07
Javascript String.removeAccent()
/**
* "À côté d'un verre vide, il y a toujours un mec plein.".removeAccent(); // A cote d'un verre vide, [...]
*/
String.prototype.removeAccent = function() {
var alphabet = {
A : ["\u00C0", "\u00C1", "\u00C2", "\u00C3", "\u00C4", "\u00C5", "\u0100", "\u0102", "\u0104", "\u01E0", "\u01FA"],
a : ["\u00E0", "\u00E1", "\u00E2", "\u00E3", "\u00E4", "\u00E5", "\u0101", "\u0103", "\u0105", "\u01E1", "\u01FB"],
B : [],
b : [],
C : ["\u00C7", "\u0106", "\u0108", "\u010A", "\u010C"],
@seebz
seebz / date.js
Last active September 3, 2020 21:27
Date.today = function() {
return new Date().midnight();
};
Date.yesterday = function() {
return Date.today().day(-1);
};
Date.tomorrow = function() {
return Date.today().day(1);
@seebz
seebz / clone.js
Created September 18, 2014 15:34
Object.clone()
Object.clone = function(obj) {
var type = typeof(obj);
if (obj instanceof Date) {
return new Date(obj.getTime());
}
else if (obj instanceof Array) {
return obj.slice(0);
}
@seebz
seebz / iCal.php
Last active May 16, 2024 12:01
iCal PHP Parser
<?php
class iCal
{
/**
* @var string
*/
public $title;
@seebz
seebz / cookiebar.js
Last active August 29, 2015 14:03
CookieBar
(function() {
function onDocumentReady(func) {
var callback = function() {
if (! func.done) {
func.done = true;
func();
}
};
if (document.readyState === "complete") {
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
color: #333;
}