Skip to content

Instantly share code, notes, and snippets.

View carlosribas's full-sized avatar

Carlos Eduardo Ribas carlosribas

View GitHub Profile
"""
Copyright [2009-present] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@carlosribas
carlosribas / main.yml
Last active March 19, 2021 19:44
Change the default stable repository
# <configuration-directory>/playbooks/roles/start-helm/tasks/main.yml
---
- name: start helm
command: helm init --stable-repo-url https://charts.helm.sh/stable
- name: "get tiller-deploy pod name"
shell: >
kubectl get pods --namespace=kube-system |
grep tiller-deploy- |
@carlosribas
carlosribas / upload-s3.sh
Last active March 2, 2023 08:27
Bash script to upload files and directories to S3
#!/bin/bash
# S3 server
server=""
# set the path based on the first argument
path=$1
# remove the last slash from the directory, if necessary
if [[ "$path" =~ '/'$ ]]; then
@carlosribas
carlosribas / import_data.py
Last active January 31, 2019 19:37
Migração do Drupal para o Mezzanine CMS
import csv
import os
from mezzanine.blog.models import BlogPost
path = "/path/to/csv/file"
os.chdir(path)
with open('result.csv') as csvfile: