Skip to content

Instantly share code, notes, and snippets.

View jbenito3's full-sized avatar

Jose Benito Gonzalez Lopez jbenito3

View GitHub Profile
# Provide the Deposit ID, access token
depid = DEPOSIT_ID
params = {'access_token': ACCESS_TOKEN}
filename = 'myfile.zip'
# Get the deposit resource as in the old API
headers = {'Content-Type': 'application/json'}
r = requests.get('https://zenodo.org/api/deposit/depositions/{depid}'.format(depid=depid),
params=params, json={}, headers=headers)
import requests
params = {'access_token': '<your-access-token>'}
# Create the deposit resource
url = "https://zenodo.org/api/deposit/depositions"
headers = {"Content-Type": "application/json"}
res = requests.post(
url,
@jbenito3
jbenito3 / docker-stop.sh
Created October 20, 2017 15:21 — forked from ntarocco/docker-stop.sh
Docker stop and kill
#!/usr/bin/env bash
docker stop $(docker ps -aq)
# docker container prune # Remove all stopped containers
# docker volume prune # Remove all unused volumes
# docker image prune # Remove unused images
# docker system prune # All of the above, in this order: containers, volumes, images
echo y | docker system prune

Keybase proof

I hereby claim:

  • I am jbenito3 on github.
  • I am jotabe (https://keybase.io/jotabe) on keybase.
  • I have a public key ASAwuR-y2RPVh3Cu2TFtzfqgOHew7uvf7G43h-rMdLKDhwo

To claim this, I am signing this object: