Configure reverse DNS
in order to avoid mail seen as spam. From command line you can check as follow
$ nslookup ktln2.org
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: ktln2.org
Address: 46.102.247.82
import re | |
from django import forms | |
from django.contrib.auth.models import User | |
from django.contrib.auth.forms import UserCreationForm | |
class UniqueUserEmailField(forms.EmailField): | |
""" | |
An EmailField which only is valid if no User has that email. | |
""" | |
def validate(self, value): |
#!/usr/bin/python | |
# All SSH libraries for Python are junk (2011-10-13). | |
# Too low-level (libssh2), too buggy (paramiko), too complicated | |
# (both), too poor in features (no use of the agent, for instance) | |
# Here is the right solution today: | |
import subprocess | |
import sys |
#!/usr/bin/env/python | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |
#!/usr/bin/env python | |
# Haversine formula example in Python | |
# Author: Wayne Dyck | |
import math | |
def distance(origin, destination): | |
lat1, lon1 = origin | |
lat2, lon2 = destination |
Configure reverse DNS
in order to avoid mail seen as spam. From command line you can check as follow
$ nslookup ktln2.org
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: ktln2.org
Address: 46.102.247.82
Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:
server {
listen 443 default ssl;
root /path/to/source;
server_name mydomain;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
from flask import Flask, render_template_string, request | |
class CustomFlask(Flask): | |
jinja_options = Flask.jinja_options.copy() | |
jinja_options.update(dict( | |
block_start_string='<%', | |
block_end_string='%>', | |
variable_start_string='%%', | |
variable_end_string='%%', | |
comment_start_string='<#', |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
<?php | |
/** | |
* All custom functions should be defined in this class | |
* and tied to WP hooks/filters w/in the constructor method | |
*/ | |
class Custom_Functions { | |
// Custom metaboxes and fields configuration |
<!-- Sample of code generated -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RGQ8NSYPA59FL">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/pt_BR/i/scr/pixel.gif" width="1" height="1">