Skip to content

Instantly share code, notes, and snippets.

@wy193777
wy193777 / swagger.json
Created May 16, 2019 23:25
Jama API Swagger.json
{
"swagger": "2.0",
"info": {
"description": "This is the documentation for the Jama REST API.",
"version": "latest",
"title": "Jama REST API",
"contact": {
"name": "support@jamasoftware.com",
"url": "https://dev.jamasoftware.com"
}
@wy193777
wy193777 / download.py
Last active September 28, 2023 17:55
Download file through HTTP using requests.py and tqdm
"""
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@wy193777
wy193777 / gist:25d8e277f4fd01b29a52f46ab0b1715f
Created April 3, 2017 23:51 — forked from mgedmin/gist:9547214
Setting up a Jenkins slave on Linux
# This is how you add a Jenkins slave
# On master:
sudo -u jenkins -H ssh-keygen
# On slave
adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave
install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave
@wy193777
wy193777 / s3_download_file_progress_bar.py
Last active July 20, 2023 15:52
Show AWS s3 download_file Progress using tqdm
#python3
def hook(t):
def inner(bytes_amount):
t.update(bytes_amount)
return inner
BUCKET_NAME = 'your_s3_bucket_name'
FILE_NAME = 'your_s3_file_name'
s3 = boto3.resource('s3')