Skip to content

Instantly share code, notes, and snippets.

View rodrigofelix's full-sized avatar

Rodrigo Almeida rodrigofelix

View GitHub Profile
@rodrigofelix
rodrigofelix / closedPointsJIRA.py
Last active July 6, 2020 14:35
Python script to calculate the number of Story Points closed for a given JIRA filter
from jira import JIRA
import getpass
# add your JIRA instance URL here
jiraURL = 'https://myjira.com'
# update with JIRA username or replace it with
# username = input('Type your JIRA username')
# to ask for the username in the command line
username = 'myusername'
@rodrigofelix
rodrigofelix / uscis_status.sh
Last active August 29, 2015 14:07
Retrieves USCIS process status and shows as a Notification on MacOS
# number of USCIS process
process='SRCXXXXXXXXXX'
# submits POST request and retrieves HTML element removing new line and whitespaces
status=`curl 'https://egov.uscis.gov/cris/Dashboard/CaseStatus.do' --data 'appReceiptNum='"$process"'&submmit.y=13' -s | xmllint --html -xpath '//div[@class="controls"]/h4' - 2> /dev/null | sed -e 's/^ *//' -e 's/ *$//' | tr -d '\n\r'`
# extracts only the status
status=`echo $status | awk -v FS="(br>|</)" '{print $2}'`
# generates a notification on MacOS