Skip to content

Instantly share code, notes, and snippets.

View thomasbergernz's full-sized avatar

Thomas Berger thomasbergernz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am thomasbergernz on github.
  • I am thomasberger (https://keybase.io/thomasberger) on keybase.
  • I have a public key ASD0w0iNf5lqhE7XhGatZ1_LRFkL8b8GWfBxy249l68yYgo

To claim this, I am signing this object:

@thomasbergernz
thomasbergernz / GoogleSheetsScriptPoloniexRates
Created December 10, 2017 01:23 — forked from jonparker/GoogleSheetsScriptPoloniexRates
Updates a list of Google Sheets with the rate from Poloniex
// Updates the A2 cell of the APIPull tab of the given Google
// sheet with the corresponding rate pulled from Poloniex.
// The Google sheet ID is in the URL. E.g.:
// https://docs.google.com/spreadsheets/d/**this part of the url is the Sheet id***/edit#gid=685386329
function fetchTicker() {
var rates = [{ RATE: 'BTC_XRP', SheetID: 'your google sheet id for XRP'},
{ RATE: 'BTC_ETH', SheetID: 'your google sheet id for ETH' },
{ RATE: 'BTC_LTC', SheetID: 'your google sheet id for LTC' }
];
package examples.docs
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.pyxis.greenhopper.GreenHopper
@WithPlugin("com.pyxis.greenhopper.jira")
@JiraAgileBean
package examples
import com.atlassian.greenhopper.model.validation.ErrorCollection
import com.atlassian.greenhopper.service.rapid.view.RapidViewService
import com.atlassian.greenhopper.web.rapid.view.RapidViewHelper
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
@WithPlugin("com.pyxis.greenhopper.jira")
package examples.docs
import com.atlassian.applinks.api.ApplicationLink
import com.atlassian.applinks.api.ApplicationLinkService
import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType
import com.atlassian.jira.issue.Issue
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.sal.api.net.Request
import com.atlassian.sal.api.net.Response
import com.atlassian.sal.api.net.ResponseException
@thomasbergernz
thomasbergernz / isTheWebsiteDown.js
Last active August 29, 2015 14:14 — forked from Marak/isTheWebsiteDown.js
Checks to see if a website is down
var http = require('http');
module['exports'] = function isTheWebSiteDown (hook) {
http.get(hook.params.url, function(res){
hook.debug(hook.params.url + " is up and running.")
hook.res.end('false');
}).on('error', function (){
hook.debug(hook.params.url + " is DOWN!")
hook.res.end('true');
});
@thomasbergernz
thomasbergernz / pipeHook.js
Last active August 29, 2015 14:14 — forked from Marak/pipeHook.js
Pipe Hooks into each other
module['exports'] = function pipeHook (hook) {
hook.debug('Opening echo hook with some data');
var hook2 = hook.open('http://hook.io/Marak/echo?foo=bar');
hook2.write('hello!');
hook2.pipe(hook.res);
};
@thomasbergernz
thomasbergernz / echoHttpRequest.js
Last active August 29, 2015 14:14 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);