This file contains 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
<?php | |
/** | |
* Smarty {soap} plugin | |
* | |
* Type: function<br> | |
* Name: soap<br> | |
* Purpose: post http data and display results from soap webservice | |
* Params: url, post(true/false - passes along orig params), assign, | |
* Usage: {soap assign=soapResponse | |
* endpoint=http://www.site.com/search.soap |
This file contains 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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
This file contains 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/php -q | |
<?php | |
/** | |
* ASTERISK PBX VOICEMAIL MAILER | |
* | |
* @author Tony Landis | |
* @link http://www.tonylandis.com | |
* @license Use how you like it, just please don't remove or alter this PHPDoc | |
*/ | |
This file contains 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
<?php | |
/** | |
* PDO SINGLETON CLASS | |
* | |
* @author Tony Landis | |
* @link http://www.tonylandis.com | |
* @license Use how you like it, just please don't remove or alter this PHPDoc | |
*/ | |
class sdb |
This file contains 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
""" | |
Convert CSV string to fixed width text table. Supports multi-line rows, column width limits, and creates a header row automatically | |
@author Tony Landis | |
@link http://www.tonylandis.com | |
@license GPL | |
""" | |
from math import ceil | |
class CsvToTxt(): |
This file contains 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 | |
""" | |
Simple script you can put in your | |
crontab to monitor replication state | |
of all docs in the _replicator | |
couchdb database. | |
Will send an email with the host name, | |
doc name and state if state is not 'triggered'. |
This file contains 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
// some data used in the examples | |
Ext.namespace('Ext.exampledata'); | |
Ext.exampledata.states = [ | |
['AL', 'Alabama', 'The Heart of Dixie'], | |
['AK', 'Alaska', 'The Land of the Midnight Sun'], | |
['AZ', 'Arizona', 'The Grand Canyon State'], | |
['AR', 'Arkansas', 'The Natural State'], | |
['CA', 'California', 'The Golden State'], | |
['CO', 'Colorado', 'The Mountain State'], |
This file contains 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 logging | |
from pylons import request, response, session, tmpl_context as c | |
from pylons.controllers.util import abort, redirect_to | |
from pylons_openid.lib.base import BaseController, render | |
log = logging.getLogger(__name__) | |
from pylons_openid.lib.auth import * | |
class RootController(BaseController): |
This file contains 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 sqlalchemy.orm import * | |
from sqlalchemy import Table, Column, ForeignKey, Integer | |
from sqlalchemy.types import Integer, Unicode, String, DateTime | |
from pylons_openid.model import meta | |
def init_model(engine): | |
"""Call me before using any of the tables or classes in the model""" | |
meta.Session.configure(bind=engine) | |
meta.engine = engine |
This file contains 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
CREATE DATABASE `pylons_openid`; | |
USE pylons_openid; | |
CREATE TABLE `user` ( | |
`id` int(11) NOT NULL auto_increment, | |
`username` varchar(128) default NULL, | |
`password` varchar(128) default NULL, | |
`acl` varchar(16) NOT NULL, | |
`name` varchar(32) default NULL, |