Skip to content

Instantly share code, notes, and snippets.

View eissaweb's full-sized avatar
🏠
Working from home

Esa eissaweb

🏠
Working from home
  • Remote
View GitHub Profile
@shark0der
shark0der / setup_mailcatcher.sh
Last active January 22, 2022 16:28 — forked from conroyp/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher --no-ri --no-rdoc
@jblyberg
jblyberg / time_ago.php
Created January 6, 2012 21:02
Human-readable "time ago" function
<?php
function TimeAgo($datefrom, $dateto = -1)
{
if ($datefrom <= 0) {
return "A long time ago";
}
if ($dateto == -1) {
$dateto = time();
}