Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / Dockerfile
Created February 23, 2019 05:54
pyenv in alpine docker
ARG PYTHON_VERSION=3.7.0-alpine3.8
FROM python:${PYTHON_VERSION} as builder
RUN apk add --update make \
cmake \
g++
RUN apk add \
git \
@cicorias
cicorias / azure_pipelines.yaml
Last active February 20, 2019 12:45
check if an Azure DevOps Service Connect is accessible
resources:
- repo: self
trigger:
branches:
include:
- master
# variables:
# container_registry: 'agogosacrdemo.azurecr.io/'
@cicorias
cicorias / dircolors
Last active February 20, 2019 12:36
dircolors
wget https://github.com/seebi/dircolors-solarized#installation
@cicorias
cicorias / git-status.sh
Last active April 11, 2019 13:39
git status
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
cat ~/.bashrc <<EOF
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
EOF
@cicorias
cicorias / apt-install.sh
Last active February 19, 2019 19:41
pyenv setup debina
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl
pyenv install 3.7.2
pyenv virtualenv 3.7.2 venv-3.7.2
@cicorias
cicorias / install-rbenv-win.bat
Created February 13, 2019 02:53 — forked from nak1114/install-rbenv-win.bat
Batch for install rbenv-win (require windows Vista+)
@echo off
setlocal
rem Set your rbenv directry
set instpath="%USERPROFILE%\.rbenv-win"
rem Clone git repositry
call git clone https://github.com/nak1114/rbenv-win.git %instpath%
rem Config path
@cicorias
cicorias / networkstuff.sh
Created February 12, 2019 19:12
ubuntu cool network tools
sudo apt-get install bmon slurm tcptrack
@cicorias
cicorias / installDocker.sh
Last active February 12, 2019 16:19
docker ubuntu - again
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
sudo add-apt-repository \
@cicorias
cicorias / vsts get endpoints.sh
Created February 6, 2019 23:03
vsts get service endpoints
#!/usr/bin/env bash
pat="..."
serviceEndpointName="ago2-arm"
endpointId="66631332-2be3-46e4-b217-0c59776cc935"
echo "calling DevOps REST API"
body=$(curl --request GET \
--url $SYSTEM_TEAMFOUNDATIONCOLLECTIONURI/$SYSTEM_TEAMPROJECT/_apis/serviceendpoint/endpoints/$endpointId?api-version=5.0-preview.2 \
@cicorias
cicorias / wow.sh
Created February 6, 2019 21:45
curl and capture both stdout and http status
#creates a new file descriptor 3 that redirects to 1 (STDOUT)
exec 3>&1
# Run curl in a separate command, capturing output of -w "%{http_code}" into HTTP_STATUS
# and sending the content to this command's STDOUT with -o >(cat >&3)
HTTP_STATUS=$(curl -w "%{http_code}" -o >(cat >&3) 'http://example.com')