Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gustavo Matias gumatias

🏠
Working from home
View GitHub Profile
@gumatias
gumatias / jira-api-access-check.sh
Created Feb 9, 2021
Jira API Client Access Check
View jira-api-access-check.sh
# make sure to replace 'my-host' 'my-email@host.com', 'my-jira-api-token' and 'issue-id' below with valid values
# Access check using curl
curl -v https://my-jira-host.atlassian.net/rest/api/latest/issue/issue-id --user my-email@host.com:my-jira-api-token
# Access check using node
node -e "const JiraApi = require('jira-client'); new JiraApi({protocol: 'https', host: 'my-jira-host.atlassian.net', username: 'my-email@host.com', password: 'my-jira-api-token', apiVersion: '2', strictSSL: true}).findIssue('issue-id').then((result) => console.log(result));"
# it should result in the issue information
View quickstart.py
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
View one-step-to-journal.sh
#!/usr/bin/env zsh
################################################################################################################
#
# This script will quickly set you up with Github Pages and jrnl to get you up and running journaling online for
# whatever your purpose is.
#
# How to run: `source one-step-to-journal.sh && bootstrap_github_journal_page`
#
# A few things to note:
View la-cucaracha.md

Public content for La Cucaracha

@gumatias
gumatias / hub.sh
Last active Aug 27, 2018
[VTS GitHub PR Template] Generates PR Template #Template #GitHub
View hub.sh
PR_JIRA_ISSUE=`g s | cut -d '/' -f 2`
BRANCH_DESCRIPTION=`g s | cut -d '/' -f 3`
PR_TITLE="${BRANCH_DESCRIPTION//-/ }"
g pull-request -r "viewthespace/convertibles" -l "qa" -m "[$PR_JIRA_ISSUE] $PR_TITLE This PR will... @viewthespace/convertibles" -e
@gumatias
gumatias / find_and_replace_all.sh
Last active Apr 19, 2018
[Find and replace strings in directory] bash shortcut to find and replace a string across all files under a specified dir #Utilities
View find_and_replace_all.sh
find . -type f -name '*.js.coffee' -exec sed -i '' s#find#replace#g {} +
View solano-ci-alert.js
alertWhenDone = function() { if($('.summary-message.running').length === 0) alert('Build is done') }
setInterval(alertWhenDone, 20*1000)
@gumatias
gumatias / promise.js
Created Dec 30, 2015
promises vts blog post
View promise.js
// This is my task requested by mom every time we would go grocery shopping
function checkCookiePrice() {
var defer = $q.defer();
setTimeout(function () {
// very random. I could only believe in God back then...
var random = Math.floor(Math.random() * 3);
if (random == 0)
// YES!
@gumatias
gumatias / repl.rb
Last active Aug 29, 2015
My nasty Ruby REPL
View repl.rb
#!/usr/bin/env ruby
def repl
input = gets.chomp
result = eval input
puts result
repl
end
repl