Skip to content

Instantly share code, notes, and snippets.

View dvdsmpsn's full-sized avatar

David Simpson dvdsmpsn

View GitHub Profile
@dvdsmpsn
dvdsmpsn / twitter-console-support.js
Created April 9, 2013 10:54
Twitter's console wrapper for non-supporting browsers
// http://stackoverflow.com/a/7585409
// from twitter source
if ( ! window.console ) {
(function() {
var names = ['log', 'debug', 'info', 'warn', 'error',
'assert', 'dir', 'dirxml', 'group', 'groupEnd', 'time',
'timeEnd', 'count', 'trace', 'profile', 'profileEnd'],
i, l = names.length;
@dvdsmpsn
dvdsmpsn / release-user-macro.vm
Created April 9, 2013 10:58
JIRA "release" user macro for Confluence
## Macro title: Release
## Macro has a body: N
##
## Developed by: David Simpson
## Date created: 2013-04
## Installed by: David Simpson
## Show the issues for a release
## @param ProjectKey:title=Project Key|type=string|required=true|desc=e.g. AF010
## @param Version:title=Version|type=string|required=true|desc=e.g. 1.1.1
@dvdsmpsn
dvdsmpsn / search-remote-confluence.php
Created May 8, 2013 09:44
Scrappy PHP script to search a remote Confluence - returns the 1st 6 results only. More details: https://answers.atlassian.com/questions/167066/integrating-confluence-in-to-our-website?page=1#167129
<!DOCTYPE html>
<html>
<head>
<title>Search</title>
</head>
<body>
<h1>Search Atlassian's documentation</h1>
<form>
<input name="q" placeholder="Search Confluence...">
<input type="submit">
@dvdsmpsn
dvdsmpsn / confluence-move-create-button.html
Last active December 18, 2015 04:49
Move the Confluence "Create" button back to the pre-Confluence 5 location.
<!-- Add this markup to Confluence Admin | Look and Feel | Custom HTML | At the END of the BODY - @see: https://gist.github.com/dvdsmpsn/5728446 -->
<style>
header#header #create-page-button {
display: none; /* hide the create button in the header */
}
</style>
<script>
// Move the Confluence "Create" button back to the pre-Confluence 5 location.
AJS.toInit(function($){
$('#navigation > ul.ajs-menu-bar').prepend(
@dvdsmpsn
dvdsmpsn / disable-anonymous-access.js
Last active December 18, 2015 07:48
Disable Anonymous access in Confluence Space Admin
// <script>
// http://localhost:1990/confluence/pages/listpermissionpages.action?key=ds
// Display Anonymous access
AJS.toInit(function(){
AJS.$('body.spacetools.view-space-administration-mode #aPermissionsTable a').remove();
AJS.$('body.spacetools.view-space-administration-mode #aPermissionsTable input').removeAttr('checked').attr('disabled','disabled');
});
// </script>
// Maybe use a condition to show only in the correct page?
@dvdsmpsn
dvdsmpsn / html5-video-user-macro.vm
Last active February 21, 2021 00:52
HTML 5 Video user macro for Confluence
## Macro title: HTML5 Video
## Macro has a body: N
##
## Output: HTML
##
## Developed by: David Simpson <david@davidsimpson.me>
## Date created: dd/mm/yyyy
## Installed by: My Name
##
## @param width:title=Width|type=string|required=false|desc=Video width
@dvdsmpsn
dvdsmpsn / gist:5773015
Last active February 22, 2017 00:32
atlas-run annoyingly prompts for email signup half way through

Problem

On a clean system, atlas-run annoyingly prompts for input halfway through (see the end of the page)

  • this is an timewaster as maven already takes a long time to download jars from repos
  • in the meantime, you're likely to wander off and do something elsewhere
  • on your return, you realise that you've got to sit through some more stuff in case there are further prompts before you can start work

Suggested alternative messaging

Instead, have some standard wording that appears at the end of all builds but doesn't prompt for user input e.g.

@dvdsmpsn
dvdsmpsn / space-list-filter.html
Last active January 21, 2018 08:59
Space List Search Filter for Confluence 5
<!--
## Search/Filter spaces on the Confluence Dashboard
##
## Having to go to the Space Directory in Confluence to search for/filter spaces really bugs me.
## This is a workaround for searching from the Dashboard
##
## Video: http://www.youtube.com/watch?v=WwbfTDd_xsY
##
## Source: https://gist.github.com/dvdsmpsn/5801337
##
@dvdsmpsn
dvdsmpsn / jira-release-summary-user-macro.vm
Last active December 18, 2015 15:48
JIRA Release Summary User Macro
## Macro title: JIRA Release Summary
## Macro has a body: N
##
##
## A user macro to simplify display of issues fixed in a release
## You just need the project key and the version number
##
## No need to remember JQL or big long URLs
##
## Developed by: David Simpson, AppFusions.
@dvdsmpsn
dvdsmpsn / expand-and-include-user-macro.vm
Created June 20, 2013 12:32
Expand and Include Page User Macro for Confluence
## Macro title: Expand and Include Page
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: David Simpson, AppFusions <david@appfusions.com>
## Date created: 2013-06-20
## Installed by: My Name
## See: https://answers.atlassian.com/questions/182288/is-there-a-shortcut-way-to-use-2-macros-together