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
import base64 | |
# https://www.ibm.com/support/knowledgecenter/en/SSYGQH_6.0.0/admin/admin/r_admin_common_oauth_manage_list.html | |
# Remove an incorrectly registered app with OAuthApplicationRegistrationService.deleteApplication(String appId) | |
# these four properties should be customised according to your setup | |
cnxDomain = 'connections.example.com' | |
boardsDomain = 'kudosboards.com' | |
appId = 'kudosboards' | |
appName = 'Kudos Boards' |
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
(()=>{ | |
const boardNode = Boards.current.boardNode; | |
const results = { | |
[boardNode.id]:{ | |
id:boardNode.id, replies:0, hashURL:boardNode.getHashURL() | |
} | |
}; | |
const nodes = Boards.current.boardNode.getAllDescendants(); | |
// initialize results | |
nodes.forEach( node => results[node.id] = {id: node.id, replies:0, url:node.getAbsoluteURL()}); |
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
(()=>{ | |
const counts = {}; | |
Boards.current.boardNode.getAllDescendants().forEach((node)=>{ | |
const type = node.attributes.commonType; | |
if(!counts[type]) counts[type] = 1; | |
else counts[type]++; | |
}); | |
Object.keys(counts).forEach(key => console.log(`${key} ${counts[key]}`)); | |
return counts; | |
})(); |
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
$NumArray = (1..9000) | |
ForEach | |
($number in $numArray) { | |
Copy-Item "C:\Users\mdonnellon\Pictures\9000\itsover9000.jpg" -Destination "C:\Users\mdonnellon\Pictures\9000\itsover9000_$number.jpg" | |
} |
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 script will find an origin node (which must already have a due date), | |
find the difference between the current origin dueDate and NEW_ORIGIN_DATE, | |
then adjust all due dates in the board by the difference in dates. | |
In other words... | |
It shifts all due dates forwards or backwards based on | |
how much we change the date on the origin card. |
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
fetch(`./node`, { | |
method: "POST", | |
headers:{"Content-Type":"application/json"}, | |
body:`{ | |
"boardId" : "${Boards.current.boardNode.id}", | |
"priv" : 0, | |
"parentId" : "${Boards.current.node.id}", | |
"position" : 1000000, | |
"template" : 0, | |
"commonType" : "reply", |
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
fetch(`./node/${Boards.current.boardNode.id}`).then(response=>response.json()).then(boardData=> { | |
const element = document.createElement('a'); | |
element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(boardData))); | |
element.setAttribute('download', boardData.name); | |
element.style.display = 'none'; | |
document.body.appendChild(element); | |
element.click(); | |
document.body.removeChild(element); | |
}); |
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
// THESE ARE TWO DIFFERENT FUNCTIONS | |
// Add cards to every list | |
(function(){ | |
const cardsPerList = 200; | |
Boards.current.boardNode.attributes.childNodes.models.forEach(list=>{ | |
for(let i = 0; i <= cardsPerList; i++ ) | |
list.createTaskChild(`Card ${i}`); | |
}); | |
})() |
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
(function deleteFiles(){ | |
const communityId = /communityUuid=([a-f0-9-]+)/.exec(window.location.href)[1]; | |
fetch(`https://devconn6.internal.isw.net.au/files/form/api/communitylibrary/${communityId}/feed?ps=500`).then((response)=>{ | |
response.text().then((text)=>{ | |
const parser = new DOMParser(); | |
const xml = parser.parseFromString(text, 'application/xml'); | |
const ids = []; | |
for(let el of xml.querySelectorAll('entry uuid')) | |
ids.push(el.textContent); | |
NewerOlder