Skip to content

Instantly share code, notes, and snippets.

View marvinpinto's full-sized avatar

Marvin Pinto marvinpinto

View GitHub Profile
@marvinpinto
marvinpinto / cleanup-ami.py
Created July 6, 2015 12:52
Python script to clean up and update the Jenkins AMIs after a successful Packer run
#!/usr/bin/python
import requests
import os
import boto.ec2
import sys
import re
build_url = os.environ['BUILD_URL']
jenkins_base_url = os.environ['JENKINS_URL']
@marvinpinto
marvinpinto / strava_cli.md
Created July 31, 2018 17:22 — forked from michaellihs/strava_cli.md
Upload tracks to Strava from the Command Line

Upload GPS Tracks to Strava from your Command Line

This short tutorial describes how to upload GPS tracks to Strava using your command line interface / shell. It requires no special tools or any 3rd party code.

Run all following steps with your user logged in to Strava in your browser!

1. Generate an API Key

@marvinpinto
marvinpinto / README.md
Last active October 10, 2017 18:22
Demo for Displaying a loading message while initializing a React component

Keybase proof

I hereby claim:

  • I am marvinpinto on github.
  • I am marvinpinto (https://keybase.io/marvinpinto) on keybase.
  • I have a public key whose fingerprint is 00CD BD49 D9B8 767D B8A4 3EED 5265 4E6E B0BB 564B

To claim this, I am signing this object:

#!/bin/bash
# Imagemagick script used to generate the logo for the 'marvinpinto-archive'
# Github Organization: https://github.com/marvinpinto-archive
# Github gravatar url from: https://api.github.com/users/marvinpinto
curl -s -o avatar.jpg https://avatars.githubusercontent.com/u/1159942?v=3
# Using the Pencil Sketch examples from:
# http://www.imagemagick.org/Usage/photos
@marvinpinto
marvinpinto / query.sh
Last active January 31, 2016 21:15
Query to return the 5 newest released Ubuntu AMI IDs
sstream-query --output-format "%(version_name)s %(region)s %(id)s %(pubname)s" \
http://cloud-images.ubuntu.com/releases \
content_id=com.ubuntu.cloud:released:aws \
virt=hvm \
version=14.04 \
label=release \
region=us-east-1 \
root_store=ebs | \
sort -n | \
tail -5
@marvinpinto
marvinpinto / Dockerfile
Last active October 4, 2015 14:12
Testing for Ansible RPM downgrading
FROM centos:6
COPY ./test_ansible.sh /
COPY ./test_playbook.yml /
RUN yum install -y \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm \
git
@marvinpinto
marvinpinto / possible_bug.md
Last active September 9, 2015 12:40
Possible quay.io API pagination bug

Here is a tiny example:

[mp-x1: 22:03:29] ~
$ curl -s -X GET -H "Content-Type: application/json" https://quay.io/api/v1/repository/travisci/travis-android/tag/?limit=3\&page=1 | python -m json.tool
{
    "has_additional": true,
    "page": 1,
    "tags": [
        {
            "docker_image_id": "aefa3995f41e2d6896530d512fa8415e5d2346058b9a55da28194cc4aa4624dd",