Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View renatoch's full-sized avatar

Renato renatoch

  • Inspira Tecnologia
View GitHub Profile
@renatoch
renatoch / Show-Hide issues like selected issue in Backlog View - Jira Next-Gen - Chrome Bookmark.js
Created June 7, 2019 02:38
Show-Hide issues like selected issue in Backlog View - Jira Next-Gen - Chrome Bookmark
// Copy and paste to a chrome bookmark on the URL field (chrome automatically joins line breaks)
// OBS: Issues are usually either in state closed / not closed.
// Based on currently selected issue, show/hide all other issues in similar state.
javascript:(function(){
$ = document.querySelectorAll.bind(document);
function GetQueryStringParams(sParam)
@renatoch
renatoch / Show-Hide closed issues in Backlog View - Jira Next-Gen - Chrome Bookmark.js
Last active June 8, 2019 05:52
Show-Hide closed issues in Backlog View - Jira Next-Gen - Chrome Bookmark
// Copy and paste to a chrome bookmark on the URL field (chrome automatically joins line breaks)
javascript:(function(){
$ = document.querySelectorAll.bind(document);
$("a[href*='browse/']").forEach(
function(elem){
classes = elem.getAttribute("class").split(' ');
if (classes.length <= 2 && window.getComputedStyle(elem).textDecoration.includes('line-through')) {
showHideElem(elem);
@renatoch
renatoch / RegisterVSExternalTool.bat
Last active August 2, 2017 23:37
Add an External Tool to Visual Studio up to VS 2015 (14.0) with a batch script (auto-detect next tool number)
@echo off
echo.
rem ========================================
rem Configure desired Tool values and desired VS Versions (tested only for 14.0, other should be the same)
rem ========================================
set VSVersions=13.0,14.0
set ToolTitle=Abrir prompt testes front-end...
set ToolCmd=$(SolutionDir)\FrontendTestsPrepare.bat
@renatoch
renatoch / paste_alpha_only.ahk
Last active March 31, 2017 23:57
Auto Hotkey (AHK) script to paste clipboard content removing non alphanumeric caracters (Hotkey - Ctrl + Alt + Shift + T)
; To be used to paste CPF / CNPJ / bar code copied to clipboard
$^+!t::
Sleep, 100
ClipSaved := ClipboardAll ;save original clipboard contents
Clipboard := RegExReplace(Clipboard, "[^a-zA-Z0-9]", "")
Sleep, 100
Send ^v ;send the Ctrl+V command
Sleep, 100
Clipboard := ClipSaved ;restore the original clipboard contents
@renatoch
renatoch / gist:1d99b7fb561e603478d8
Created May 28, 2015 05:15
Specflow Auto Hotkey (AHK) script to remove #line before this.Feature in wrong places and make double clicking tests work
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
; * Sem ending chars (tab, enter, etc)
; C Case sensitive
#Hotstring C R *
@renatoch
renatoch / Get JIRA issue key and summary using chrome bookmark.js
Last active June 7, 2019 01:53
Get JIRA issue key and summary using chrome bookmark
javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3Bvar issues %3D jQuery('.ghx-selected').filter('.js-issue').map(function(i%2C issue) %7Bvar k %3D jQuery(issue).attr("data-issue-key")%3Bvar s %3D jQuery(issue).find('.ghx-summary').attr("title")%3Breturn %7B key%3A k%2C summary%3A s%7D%7D).toArray()%3B%2F* copy issue from open issue *%2Fvar t %3D document.title.replace(" - JIRA"%2C "")%3Bvar match %3D t.match(%2F%5C%5B(.*)%5C%5D%2F)%3Bif (match) %7Bvar k %3D match%5B1%5D%3Bissues.push(%7B key%3A k%2C summary%3A t.replace("%5B" %2B k %2B "%5D "%2C "")%7D)%7D%2F* create list *%2Fvar links %3D jQuery.map(issues%2C function(i)%7Breturn "%5B" %2B i.key %2B "%5D " %2B i.summary%3B%7D)%3Bwindow.prompt ("Copy to clipboard%3A Ctrl%2BC%2C Enter"%2C links.join("%5Cr%5Cn"))%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2