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 | |
//on page load the "is this a postback?" filter function runs: | |
function livefyre_comment_update() { | |
if (isset($_GET['lf_wp_comment_postback_request']) && $_GET['lf_wp_comment_postback_request']=='1') { | |
livefyre_do_sync(); | |
// Instruct the backend to use the site sync postback mechanism for future updates. | |
echo "{\"status\":\"ok\",\"message\":\"sync-initiated\"}"; | |
exit; |
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
-<script type="text/javascript">var livefyre_blogtype='joomla';</script> | |
+<script type="text/javascript"> | |
+ var livefyre_blogtype='joomla'; | |
+ var customLivefyreDelegates = { | |
+ handle_comment_shown: function(data) { | |
+ var max_comment_length = 200, | |
+ cid = data.comment.attr('comment_id'), | |
+ models = LF.Comments.models, | |
+ len = models.length; | |
+ if (len > max_comment_length) { |
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
var engage = new fyre.sp.app.Engage({app: '{!! name of your engage app here !!}'); | |
var profiles = new fyre.sp.app.Profile({}); | |
var delegates = { | |
'handle_auth_login': function() { | |
engage.signIn(); | |
}, | |
'handle_auth_logout': function() { | |
engage.signOut(); |
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
index bb184ab..18437c6 100644 | |
--- a/a | |
+++ b/a | |
@@ -18,8 +18,14 @@ class EmailBackend(BaseEmailBackend): | |
super(EmailBackend, self).__init__(fail_silently=fail_silently) | |
self.host = host or settings.EMAIL_HOST | |
self.port = port or settings.EMAIL_PORT | |
- self.username = username or settings.EMAIL_HOST_USER | |
- self.password = password or settings.EMAIL_HOST_PASSWORD | |
+ if username is None: |
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
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \ | |
echo "\[\e[0;32m\][GIT: \[\e[0;31m\]$(basename `pwd`); \[\e[0;33m\]$(git branch | grep ^*|sed s/\*\ //) \ | |
$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -eq "0" ]; then \ | |
echo "\[\e[0;32m\]clean"; else \ | |
echo "\[\e[0;31m\]dirty"; fi)\[\e[0;32m\]] \$ "; else \ | |
echo "\[\e[0;31m\][\w]\[\e[m\] \$ "; fi) \[\e[0m\]' |
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
function d2g() { | |
if [ -z "`git diff`" ] ; then | |
echo 'There is no diff to publish, brah.' | |
return | |
fi | |
if [ $# -eq 0 ] ; then | |
echo 'Please provide a name for the file.' | |
return | |
fi | |
curl -H "Authorization: token XXXXtokenWithGistScopeXXXX" -d "{\"description\":\"diff for branch: `git branch | grep \* | sed s/\*\ //g`, created: `date`\",\"public\":false,\"files\":{\"$1.diff\":{\"content\":\"`ruby -e 'require "rubygems";require "json";puts JSON.dump(\`git diff\`)[1..-2]'`\"}}}" https://api.github.com/gists | grep '^ "html_url": "https://gist.github.com' | sed s/\ \ \"html_url\"\:\ \"//g | sed s/\",// | pbcopy |
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
class ChainedMock < RSpec::Mocks::Mock | |
class WrongMethodCalled < StandardError; end | |
def method_missing meth, *args, &block | |
raise WrongMethodCalled.new "expected method #{@next} to be next in the chain, but instead received #{meth}" | |
end | |
def should_receive(meth, opts = {}, &block) | |
@next = meth | |
super |
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
def should_be_a_subset(superset, records_selected_by_scope, &condition) | |
flunk "Your superset is empty" if superset.empty? | |
flunk "Your scope did not select any records" if records_selected_by_scope.empty? | |
records_selected_by_block, records_excluded_by_block = superset.partition(&condition) | |
flunk "Your test condition did not select any records" if records_selected_by_block.empty? | |
flunk "Your test condition did not exclude any records" if records_excluded_by_block.empty? | |
records_selected_by_scope.map(&:id).should =~ records_selected_by_block.map(&:id) | |
end |
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
diff --git a/functions/_middleware.ts b/functions/_middleware.ts | |
index 9d5ae42..8f46b34 100644 | |
--- a/functions/_middleware.ts | |
+++ b/functions/_middleware.ts | |
@@ -1,8 +1,20 @@ | |
import cloudflareAccessPlugin from "@cloudflare/pages-plugin-cloudflare-access"; | |
-export const onRequest = ({ env }) => { | |
- return cloudflareAccessPlugin({ | |
- domain: "https://timely-tasker.cloudflareaccess.com", |