This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Robert L Carr", | |
"label": "", | |
"picture": "", | |
"email": "[email protected]", | |
"phone": "(650) 430-5034", | |
"website": "http://registry.jsonresume.org/rlcarrca", | |
"summary": "An accomplished hands-on technologist offering over 20 years of demonstrated career success development. Experienced in all phases of software engineering and management from concept to continuing engineering: Market requirements, technology licensing, standards, architectural and engineering specifications, resource planning, recruiting, performance evaluations, budgets, scheduling, contract negotiation, customer support, etc.. Extensive experience leading operations for Technology and Application development within a diverse range of industries. Proven ability to conceptualize and deliver complex technology solutions. Strong understanding of the relationship between technology and strategic business interests. ", | |
"location": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import unicode_literals | |
import os | |
from bottle import route, request, static_file, run, response | |
@route('/') | |
def root(): | |
return static_file('test.html', root='.') | |
@route('/upload', method='POST') | |
def do_upload(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def loadCommandLineArgs(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-r", "--regen", help="Generate reports for all dates", | |
default=False, action="store_true") | |
return parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
import sys | |
import ldap | |
from ldap.controls import SimplePagedResultsControl | |
from distutils.version import LooseVersion | |
# Check if we're using the Python "ldap" 2.4 or greater API | |
LDAP24API = LooseVersion(ldap.__version__) >= LooseVersion('2.4') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ldap | |
def check_credentials(username, password): | |
"""Verifies credentials for username and password. | |
Returns None on success or a string describing the error on failure | |
# Adapt to your needs | |
""" | |
LDAP_SERVER = 'ldap://xxx' | |
# fully qualified AD user name | |
LDAP_USERNAME = '%[email protected]' % username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian 7 x64, Ubuntu 14.04 x64, Ubuntu 12.04.4 x64 | |
*NOTE (tested on Digital Ocean VM's w/ > 512MB of RAM - gcc runs out of memory on VM's <= 512 MB) | |
apt-get update | |
aptitude safe-upgrade | |
apt-get install build-essential libboost-all-dev libcurl4-gnutls-dev autoconf antlr swig python-dev | |
*NOTE (for python 3 support add 'python3-dev' to the end of line 5) | |
cd /tmp | |
wget https://github.com/NationalAssociationOfRealtors/libRETS/archive/1.6.1.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from boto.sqs.connection import SQSConnection | |
conn=SQSConnection('AWS_ACCESS_KEY_ID','AWS_SECRET_KEY') | |
q=conn.get_queue(sys.argv[1]) | |
attrib = q.get_attributes("ApproximateNumberOfMessages") | |
print int(attrib['ApproximateNumberOfMessages']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to: chrome://settings/searchEngines | |
Add a new search engine with the following settings | |
Gif | Gif | https://www.google.com/search?q=%s&tbm=isch&tbs=itp:animated | |
Type gif in the address bar press TAB and enter your search query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Determination of the day of the week | |
Jan 1st 1 AD is a Monday in Gregorian calendar. | |
So Jan 0th 1 AD is a Sunday [It does not exist technically]. | |
Every 4 years we have a leap year. But xy00 cannot be a leap unless xy divides 4 with reminder 0. | |
y/4 - y/100 + y/400 : this gives the number of leap years from 1AD to the given year. As each year has 365 days (divdes 7 with reminder 1), unless it is a leap year or the date is in Jan or Feb, the day of a given date changes by 1 each year. In other case it increases by 2. | |
y -= m<3 : If the month is not Jan or Feb, we do not count the 29th Feb (if it exists) of the given year. | |
So y + y/4 - y/100 + y/400 gives the day of Jan 0th (Dec 31st of prev year) of the year. (This gives the reminder with 7 of the number of days passed before the given year began.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl \ | |
--digest \ | |
--user-agent "MyCurlClient/1.0" \ | |
-o data/metadata.xml \ | |
--show-error \ | |
--dump-header data/headers.txt \ | |
-u "username:password" \ | |
--header "RETS-Version: RETS/1.5" \ | |
--cookie-jar data/cookies.txt \ | |
--cookie data/cookies.txt \ |
NewerOlder