This file contains 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
module.exports = function() { | |
/** | |
* Handlebars block helper that renders the content inside of it based on the current page. | |
* @param {string...} pages - One or more pages to check. | |
* @param (object) options - Handlebars object. | |
* @example | |
* {{#ifpage 'index' 'about'}}This must be the index or about page.{{/ifpage}} | |
* {{#ifpage 'about*' '*ends' '*ind*ex*'}}This must be the index or about page.{{/ifpage}} | |
* | |
{{#ifpagewildcard 'over*view'}}<p>over*view</p>{{/ifpagewildcard}} |
This file contains 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
#!/bin/sh | |
# Tunnelblick route traffic based on urls and domains | |
# Configuration at the end of this file: | |
# 1. Specify tunnel interface | |
# 2. Enter url/domain which is used to gather IP addresses | |
# Copy this file to (sudo): | |
# cd ~/Library/Application\ Support/Tunnelblick/Configurations/{NAME}/Contents/Resources |
This file contains 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
// ==UserScript== | |
// @name Jenkins show deployment errors | |
// @namespace https://jenkins | |
// @version 0.2 | |
// @description Displays errors on top of the console page of a failed job. | |
// @author Markus Edenhauser | |
// @include /^https://jenkins*/ | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/UserScript== |
This file contains 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
-- DROP all data tables | |
DROP TABLE IF EXISTS users; | |
DROP TABLE IF EXISTS userdetails; | |
DROP TABLE IF EXISTS devices; | |
DROP TABLE IF EXISTS devicesdetails; | |
-- USERS and USER DETAILS | |
CREATE TABLE users | |
(`row_id` int, `id` int, `owner_id` int, `name` varchar(55)) | |
; |
This file contains 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
// ==UserScript== | |
// @name Jenkins kill BuildQueue + Jobs | |
// @namespace https://jenkins | |
// @version 0.32 | |
// @description Adds a link to Queue and Jobs for killing all of them. | |
// @author Markus Edenhauser | |
// @include /^https://jenkins*/ | |
// @exclude *configure | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js |
This file contains 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
// ==UserScript== | |
// @name Jenkins kill BuildQueue + Jobs | |
// @namespace http://jenkins | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Markus | |
// @match https://jenkins.prod.sevenup.ycd.ydev.hybris.com:10000/* | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/UserScript== |
This file contains 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
#!/bin/bash | |
# Check for merge conflicts | |
# Tested on Linux and Mac | |
# Simple check for merge conflics | |
conflicts=`git diff --cached --name-only -G"<<<<<|=====|>>>>>"` | |
This file contains 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
'use strict'; | |
/** | |
* clicks on an element found in a parent container | |
* | |
* @param {string} dropdownSelector mostly dropdown, but can be also other list or container | |
* @param {string} elementSelector element selector to click on | |
* @param {boolean} graceful if elementSelector is not present, either continue (true), or throw an error (false) | |
* @param {boolean} maxTimeout timeout to wait for element | |
* @return {mixed} graceful = true: continues, graceful = false: throws error |