Skip to content

Instantly share code, notes, and snippets.

View carlos8f's full-sized avatar

Starbuck Starfish carlos8f

View GitHub Profile
@carlos8f
carlos8f / changelog.sh
Created July 3, 2011 21:46 — forked from anonymous/changelog.sh
Git Changelog
#!/bin/bash
# Generates changelog day by day
echo "CHANGELOG"
echo "====================================="
git log --no-merges --format="%cd" --date=short $1 | sort -u -r | while read DATE ; do
echo
echo $DATE
echo "---------------------------------"
git log --no-merges --format=" * %s%+b" --since="$DATE 00:00:00" --until="$DATE 24:00:00" | sed -e '/ \* /!s/^/ /g'
done
@carlos8f
carlos8f / Sphinx.patch
Created July 5, 2011 20:45
Fix for Sphinx serverdensity plugin
--- Sphinx.py 2011-07-05 16:43:02.000000000 -0400
+++ Sphinx.py 2011-07-05 16:42:21.000000000 -0400
@@ -1,4 +1,5 @@
import subprocess
+import platform
class Sphinx:
def __init__(self, agentConfig, checksLogger, rawConfig):
@@ -14,7 +15,14 @@
self.checksLogger.debug('sphinx: start')
<script type="text/javascript">
<!--//--><![CDATA[//><!--
document.write(unescape("%3Cscript src='http" + (document.location.protocol == 'https:' ? 's' : '') + "://s3.amazonaws.com/connect.freedomworks.org/scripts/convio.js' type='text/javascript'%3E%3C/script%3E"));
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
FC_Convio.embedLoginButton('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
//--><!]]>
</script>
FC_Convio.embedLoginButton('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
FC_Convio.embedEditProfileLink();
var passthru_url = FC_Convio.getPassthruURL('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
document.writeln('<p><a href="' + passthru_url + '">' + passthru_url + '</a></p>');
// To just get the SSO URL (button href), you can do:
var sso_url = FC_Convio.getSSOURL( [dest] );
// To just get the profile edit URL, you can do:
var profile_edit_url = FC_Convio.getProfileEditURL();
@carlos8f
carlos8f / gist:1314123
Created October 25, 2011 20:22
FreedomConnector Single Sign-on documentation

FreedomConnector Single Sign-on

This document describes how a 3rd party site (consumer) can authenticate users using their FreedomConnector (provider) account. FreedomWorks uses this technique to implement single sign-on between sub-sites, but it may also be usable to non-FreedomWorks sites as well.

Client-side Single Sign-on

Terra Eclipse has developed a simple JSONP-based service, which can expose a limited amount of profile data to 3rd party sites via javascript.

@carlos8f
carlos8f / gist:1318025
Created October 26, 2011 22:01
Require FC session on a Convio page
<script type="text/javascript" src="//s3.amazonaws.com/connect.freedomworks.org/scripts/convio.js"></script>
<script type="text/javascript">
function checkSession(session) {
if (!session.uid) {
window.location.href = FC_Convio.getSSOURL();
}
}
</script>