Feb 25, 2017 - SMTP to SMS relay

This script will send SMS via various smtp relays.

import smtplib

# Use sms gateway provided by mobile carrier:
# alltel         number@message.Alltel.com 
# at&t:          number@mms.att.net
# boost:         number@myboostmobile.com
# google voice   number@@txt.voice.google.com (needs work)
# metro pcs:     number@mymetropcs.com
# sprint:        number@page.nextel.com
# straight talk  number@mypixmessages.com
# t-mobile:      number@tmomail.net
# us cellular:   number@mms.uscc.net  
# verizon:-       number@vtext.com
# virgin:        number@vmpix.com

server = smtplib.SMTP( "smtp.gmail.com", 587 )
server.ehlo()
server.starttls()
server.ehlo()
server.login( 'Google username', '<Google app password >' )


#server.sendmail( '<from>', '<number>@tmomail.net', 'Hello!' )

server.sendmail( '<sending phone number>', '<receiving phone numver>@<domain.com>', 'Leory Jenkins!!!!' )

Jan 17, 2017 - Python WSGI

How to run a python pyramid application under apache2(httpd) using the mod_wgsi.

Create application user

  useradd appdeploy

Edit /etc/passwd

  appdeploy:x:<uid>:<gid>:appdeploy:/<home>/<directory>:/sbin/nologin

Create an apache2 config file under /etc/httpd/conf.d/

<virtuallHost *:80>
  ServerName archive.fqdn.com

# Use only 1 Python sub-interpreter.  Multiple sub-interpreters
# play badly with C extensions.  See
# http://stackoverflow.com/a/10558360/209039
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess pyramid user=appdeploy    group=appdeploy  threads=4 \
   python-path=/var/www/archive/temp_py/lib/python2.7/site-packages
WSGIScriptAlias / /var/www/archive/pyramid.wsgi

<Directory /var/www/archive>
  WSGIProcessGroup pyramid
  Order allow,deny
  Allow from all
</Directory>

</VirtualHost>

Create a WSGI file in the application directory that will be called by the apache2 service.

import os,sys,site

os.environ['PYTHON_EGG_CACHE'] = '/var/www/archive/temp_py'

from pyramid.paster import get_app, setup_logging
ini_path = '/var/www/archive/production.ini'
#setup_logging(ini_path)
application = get_app(ini_path, 'main')

Dec 12, 2016 - Google Analytics

I am not sure of the Russian interest in this website.

These are some funny languages useful image useful image useful image useful image useful image

screenshotOne screenshotTwo screenshotThree screenshotFour screenshotFive