Skip to content

Instantly share code, notes, and snippets.

@paulmorriss
paulmorriss / gist:10982078
Last active August 29, 2015 13:59
Set NetCommunity donation form fields according to values in URL - see http://manypies.paulmorriss.com/2013/06/netcommunity-donation-form-based-on-url.html
<!-- Javascript for parseQueryString -->
<script type="text/javascript" src="/NetCommunity/Document.Doc?id=10"></script>
<script type="text/javascript">
function replaceAmountRecipient()
{
var xyzPrefix = '';
xyzPrefix = Page_Validators[0].controltovalidate.substring(0,7);
//If it is a three digit prefix then we chop it down
if (xyzPrefix.slice(-1) != "_") {
xyzPrefix=xyzPrefix.substring(0,6);
<div class="hideaftergiving">
Please give</div>
<div class="hideaftergiving">
It will help.</div>
<style type="text/css">
div.hideaftergiving {
display: none; !important
}
</style>
@paulmorriss
paulmorriss / gist:10983264
Last active August 29, 2015 13:59
NetCommunity - redirect to previous page after login - see http://manypies.paulmorriss.com/2011/11/blackbaud-netcommunity-redirect-to.html
<!-- Javascript for parseQueryString -->
<script type="text/javascript" src="/NetCommunity/Document.Doc?id=10"></script>
<script type="text/javascript">
function gotoPreviousPageId()
{
loginPageId='274';
loginHomePageId='275';
// Technically this is not the query string for this page, it is the query string for the referring page
if (document.referrer !== '') {
var queryData = parseQueryString(document.referrer);
@paulmorriss
paulmorriss / bboxtweakform
Last active August 29, 2015 14:06
Blackbaud Online Express tweak donation form
<script type="text/javascript">
/* See http://manypies.paulmorriss.com/2014/09/online-express-third-post.html for explanation of this.
** waitUntilExists comes from here: https://gist.github.com/buu700/4200601 */
/* Put this after the BBOX code to embed the form */
$("input#bboxdonation_btnSubmit").waitUntilExists(function() {
/* Set the posttown prompt on the BBOX donations forms*/
if ($('#bboxdonation_billing_billingAddress_txtUKCity').length != 0) {
$('#bboxdonation_billing_billingAddress_txtUKCity').attr('placeholder','Posttown');
}
@paulmorriss
paulmorriss / gist:49ba29786389adf77add
Last active August 29, 2015 14:07
Workaround for Online Express Direct debit bug
/* See http://manypies.paulmorriss.com/2014/10/blackbaud-online-express-direct-debit.html for what this is used for*/
$("label#bboxdonation_payment_lblChoiceDirectDebit").click(function() {
if (!$('input#bboxdonation_recurrence_chkMonthlyGift').attr('checked')) {
alert('If you want to pay by direct debit you must tick "Make this a monthly gift"');
}
});
### Keybase proof
I hereby claim:
* I am paulmorriss on github.
* I am paulmorriss (https://keybase.io/paulmorriss) on keybase.
* I have a public key whose fingerprint is 6A38 3A81 B1FC 4224 F18A 9800 2A19 8A5B 50D2 D21D
To claim this, I am signing this object:
@paulmorriss
paulmorriss / gist:ea19521890b5a3d08d74
Last active August 29, 2015 14:27
wordpress hidden image
<a href="imageurl.png"><img src="imgurl.png" alt="alttext"
class="alignright size-full wp-image-9999"
style="display:none" /></a>
@paulmorriss
paulmorriss / gethout.txt
Last active November 11, 2015 13:34
Selected extracts from my Raspberry Pi geth node trying to fast sync
I1104 22:39:41.213076 17188 downloader.go:291] Block synchronisation started
I1104 22:59:18.811330 17188 downloader.go:272] Synchronisation failed: no peers to keep download active
I1105 05:41:49.507268 17188 blockchain.go:787] imported 2 header(s) (190 ignored) in 1m44.180170484s. #194 [3d612266… / ba2a6989…]
I1105 05:42:04.793381 17188 downloader.go:1113] Rolled back 2 headers (LH: 194->192, FB: 0->0, LB: 0->0)
I1105 06:11:47.181506 17188 downloader.go:272] Synchronisation failed: peer is unknown or unhealthy
I1105 06:33:50.388370 17188 blockchain.go:787] imported 0 header(s) (192 ignored) in 4.057517406s. #194 [3d612266… / ba2a6989…]
I1105 06:33:53.825243 17188 blockchain.go:968] imported 1 receipt(s) (0 ignored) in 17.56434ms. #3 [3d612266… / 3d612266…]
I1105 06:33:55.198414 17188 blockchain.go:968] imported 17 receipt(s) (0 ignored) in 472.613132ms. #20 [23adf5a3… / 720c4772…]
I1105 06:33:56.811207 17188 blockchain.go:968] imported 34 receipt(s) (0 ignored) in 1.11208648