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
| [//lasso | |
| /* | |
| [Image] type for Lasso 8.x | |
| This is a drop-in replacement for the native [Image] type in Lasso 8.x. This version requires | |
| [OS_Process] and calls the ImageMagick command line utilities rather than relying on the | |
| low-level libraries. Doing so eliminates the need to install an older version of ImageMagick and | |
| its dependencies on the server for compatibility. It is recommended that the ImageMagick module | |
| be removed from LassoModules when using this replacement to avoid startup errors. |
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 pyramid.decorator import reify | |
| from .principals import Principals as P | |
| class AccessToken: | |
| def __init__(self, type, user=None, claims=None): | |
| self.type = type | |
| self.user = user | |
| self.claims = claims or [] |
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
| DEBUG=yes | |
| AUTH_SECRET=seekrit | |
| AUTH_EXPIRES=3600 | |
| HTTPS_ONLY=no | |
| WEB_CONCURRENCY=4 | |
| TRUSTED_PROXY=127.0.0.1 | |
| BIND_HOST=127.0.0.1 |
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
| [//lasso | |
| library('mailchimp.lasso'); | |
| // create a new mailchimp instance | |
| // NOTE: -verifypeer worked fine for me on Linux, but not Windows | |
| var('mc') = mailchimp( -key='{YOUR_MAILCHIMP_API_KEY}', -version=3.0, -verifypeer=false); | |
| // get all campaigns | |
| $mc->get('/campaigns'); | |
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
| # | |
| # Copyright (C) 2013 Vinay Sajip. New BSD License. | |
| # | |
| import os | |
| import os.path | |
| from subprocess import Popen, PIPE | |
| import sys | |
| from threading import Thread | |
| from urllib.parse import urlparse | |
| from urllib.request import urlretrieve |
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
| <?lasso | |
| define oauth_consumer_key => 'key' | |
| define oauth_consumer_secret => 'secret' | |
| define oauth_request_token => 'requestkey' | |
| define oauth_request_secret => 'requestsecret' | |
| define oauth_access_token => 'accesskey' | |
| define oauth_access_secret => 'accesssecret' | |
| define oauth_realm => 'http://term.ie/' | |
| define oauth_request_endpoint => {return 'http://term.ie/oauth/example/request_token.php'} | |
| define oauth_access_endpoint => 'http://term.ie/oauth/example/access_token.php' |
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
| [ | |
| /**! | |
| jc_session | |
| Lasso 9 type to handle cookie based sessions | |
| Requires that Ke Carltons DS is installed | |
| https://github.com/zeroloop/ds | |
| Before first use create the needed table and set the proper values for |
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
| [ | |
| /**! | |
| wrp | |
| Quick way to grap a web_request param | |
| 2014-10-08 JC Added to Gist | |
| 2014-10-08 JC Added separate methods for queryparams and postparams | |
| 2014-08-24 JC Rewrite of the wrp method once again. This time with code suggested by Brad Lindsay in a lassotalk thread. Introduces the param -all | |
| 2014-08-22 JC Complete rewrite to produce leaner and more reliable code. Arrays are now returned as staticarrays |
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
| [ | |
| // [Email_Send2] | |
| // | |
| // This tag is a drop-in replacement for [Email_Send]. It uses [Email_Compose] on the back-end in order | |
| // to create the message to be sent. | |
| // | |
| /* PATCH | |
| * Replaces subject line that is encoded word by word with a subject line that is encoded as a whole. |
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
| [ | |
| /* | |
| 2014-10-08 JC Added to Gist | |
| */ | |
| /**! | |
| ical_encodebreak | |
| Method to ensure that the given string complies to the icalendar requirements that no row inside an icalendar object is longer than 75 octets (bytes) |
NewerOlder