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/env bash | |
set -x | |
black=$1 | |
input_file=$2 | |
start_line=$3 | |
end_line=$4 | |
# Read selected lines and write to tmpfile |
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
[ | |
/* | |
Look for net->wait failure and restart Lasso site if it stops working | |
to prevent issues with POP and SMTP. | |
Put this file in web root and watch_net_failure_startup.lasso in LassoStartup | |
Johan Sölve 2015-08-05 | |
http://lasso.2283332.n4.nabble.com/SMTP-and-POP-problems-on-8-6-3-Mac-caused-by-net-gt-wait-td4644107.html |
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
[ | |
// [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
[ | |
/**! | |
jc_session | |
Lasso 9 type to handle cookie based sessions | |
NOTE, as of this release the code is using json_encode/json_decode as a replacement for json_serialize/json_deserialize. If you are running this in an environment prior to Lasso 9.3 you will have to replace all instances of json_encode with json_serialize and json_decode with json_deserialize! | |
NOTE, if this is an updated version you'll need to add an additional field to the session table. Run the following sql for Mysql: | |
ALTER TABLE `jc_session` |
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
# This assumes Docker, Fig, and boot2docker have already been installed | |
# and that you've set up the app specified in Fig's Quick Start at http://www.fig.sh/. | |
# Try it! | |
boot2docker init | |
boot2docker up | |
export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375 | |
fig up | |
# Uh oh, that didn't work, let's set up rsync |
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
Video demo at http://screencast.com/t/WcjpL2lc. | |
By default it uses a title field ending in [title] or [name] as the source field, and a field ending in [slug] as the destination. This matches the naming conventions for a framework like CakePHP, i.e. <?php echo $form->input('title'); ?> outputs an input with a name of data[Model][title]. | |
You can override the default source and destination fields by setting document.slugField and document.titleField in JavaScript beforehand: | |
<script> | |
document.titleField = "input[name$='[heading]']"; | |
document.slugField = "input[name$='[url_safe_heading]']"; | |
</script> |
NewerOlder