Skip to content

Instantly share code, notes, and snippets.

View allanpedroni's full-sized avatar
🎯
Focusing

Allan Barros allanpedroni

🎯
Focusing
View GitHub Profile
@allanpedroni
allanpedroni / extract.py
Created September 3, 2019 19:20 — forked from briglx/extract.py
Extract Email from Outlook with Python
import win32com.client
items = []
def encodeit(s):
if isinstance(s, str):
return unicode(s, 'utf-8')
else:
return s
#!/usr/bin/env bash
GIST_ID=${1}
# Check if the GIST_ID param has a value
if [ -z "$GIST_ID" ];
then
echo 'GIST_ID is a required parameter';
else
#!/bin/bash
# PRE-REQ
# - INSTALL JQ
# - Required enviroment variables:
# export VSTS_BASE_URL = "(ex: https://YOUR_ORG.visualstudio.com/)"
# export VSTS_TOKEN = "(ex: xpto...)"
# export VS_DEVENV = "(ex: "/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/devenv.exe")"
set -e
@allanpedroni
allanpedroni / pretty-json-output
Created July 8, 2019 11:35 — forked from matheusneder/pretty-json-output
Format and colorize json output
#!/bin/bash
JQ_OUTPUT=$(mktemp)
cat /dev/stdin | while read -r l;
do
if echo $l | jq -C '.' > $JQ_OUTPUT 2>&1
then
cat $JQ_OUTPUT
else