Skip to content

Instantly share code, notes, and snippets.

@sandromello
sandromello / zimbra_soap_request.py
Created February 22, 2017 11:37
Example requesting Zimbra SOAP API
#!/usr/bin/env python
import xml.etree.ElementTree as ET
import requests
url = 'https://<ZIMBRA_SERVER_URL>:7071/service/admin/soap'
headers = { 'Content-Type': 'application/soap+xml' }
# Get the credentials through zmlocalconfig
# zmlocalconfig zimbra_user
import click
import numpy as np
import rasterio
def find_dark_object_value(arr):
"""Find the value of the dark object
ie the first dark value that is not an outlier
"""
preval = None
@Corgumolax
Corgumolax / delegate-admin
Last active August 28, 2021 15:22
Delegate admin for Zimbra 8 foss edition
#!/bin/bash
# Create delegated administrator on Zimbra 8.x FOSS Edition
# Credits to barrydegraaff: https://gist.github.com/barrydegraaff/d1549d7e3f1951067da2
# Warning: MUST be use as ZIMBRA user and DOMAIN variable MUST be set
# Delegated admin can create/modify accounts, alias, distribution lists and resources
# Domain of concern to be changed
DOMAIN='example.com'
@rdeavila
rdeavila / git-update-fork.sh
Last active March 10, 2025 23:52
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream