Skip to content

Instantly share code, notes, and snippets.

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

Jeremy Ikwuje jeremyikwuje

🏠
Working from home
View GitHub Profile
@rtulke
rtulke / markdown-to-email
Created June 12, 2018 16:32 — forked from cleverdevil/markdown-to-email
markdown-to-email A simple script to send beautifully formatted emails that you write in Markdown. The email will have an HTML payload and a plain-text alternative, so you'll make everyone happy, including yourself.
#!/usr/bin/env python
'''
Send an multipart email with HTML and plain text alternatives. The message
should be constructed as a plain-text file of the following format:
From: Your Name <your@email.com>
To: Recipient One <recipient@to.com>
Subject: Your subject line
---
@revolunet
revolunet / userip.php
Created September 5, 2011 09:06
get real user ip with PHP
<?php
// from http://www.xpertdeveloper.com/2011/09/get-real-ip-address-using-php/
if (!empty($_SERVER["HTTP_CLIENT_IP"]))
{
//check for ip from share internet
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"]))
{
// Check for the Proxy User