Skip to content

Instantly share code, notes, and snippets.

@gabalis
gabalis / temp_mail_server.md
Created December 24, 2017 15:16 — forked from gowtham1337/temp_mail_server.md
A quick guide for creating your own temporary mail server

##Overview You might have a need for a temporary mail service like mailinator.com on your own machine. This guide provides the minimum required steps to do that. The setup we will use is as follows

Procmail (Receive mail and forward to script)--->PHP Script(Parse Mail and put in Database)--->MySQL(Store the mails)--->JSON

Note: This is intended as a quick DIY for simple projects. Hence, we will not go into more details like spam detection and memory optimization.

##Instructions ####Setup Infrastructure

  1. Get a Top level domain name (Note: Getting this to work with a sub-domain will require more work and setup)
Verifying that +matthiou is my blockchain ID. https://onename.com/matthiou
@gabalis
gabalis / tabindex-for-all.js
Created September 29, 2015 10:31
Add tabindex to all elements which do not have one yet
// adding tabindex to all relevant elements which need it
// so we exclude the tabindexed elements
// tabindex = 0 will come after the positively numbered elements
// cf http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex
jQuery(document).ready(function($) {
$('a, input, select, button, textarea').not('[tabindex]').attr('tabindex',0);
});
@gabalis
gabalis / hashgreen
Created October 31, 2011 17:38
A javascript to improve hashbrown — http://daneden.me/hashbrown/
// find all anchors in document
var allAnchors = document.getElementsByTagName('a');
// read them one by one
for (var i = 0, oneAnchor; oneAnchor = allAnchors[i]; i++) {
// is href just a hash ?
if ( oneAnchor.href == '#' )
{
// replace with well behaved