- Create an empty repo in BitBucket
git clone --bare [email protected]:user/repo.git
cd repo.git
git push --mirror [email protected]:user/repo.git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
################# | |
## CREDENTIALS ## | |
################# | |
GH_PERSONAL_ACCESS_TOKEN = '' | |
BB_USERNAME = '' | |
BB_APP_PASSWORD = '' | |
BB_OAUTH_KEY = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copies all keys from the source Redis host to the destination Redis host. | |
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
restricted (e.g. on Amazon ElastiCache). | |
The script scans through the keyspace of the given database number and uses | |
a pipeline of DUMP and RESTORE commands to migrate the keys. | |
Requires Redis 2.8.0 or higher. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from google.cloud.firestore import Client | |
import random | |
import requests | |
import prefect | |
from prefect import Flow, Parameter, task | |
from prefect.client import Secret | |
from prefect.schedules import CronSchedule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# This is a parser for bash-style variable assignments. | |
# It fully (?) supports the syntax w/o braces, the ${}-syntax | |
# is implemented very hackish. (There are also detailed | |
# TODO-comments in various places) | |
# This is meant for Archlinux' AUR to be used to parse | |
# PKGBUILD's properly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# make output file | |
basedir=~/.openvpn | |
vpnconfigdir=$basedir/$2 | |
mkdir -p $basedir | |
mkdir -p $vpnconfigdir | |
# print Gateway | |
sed -n 's/remote \([^ ]\+\) [0-9]\+/passerelle: \1/p' $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
""":" | |
which python3 >/dev/null 2>&1 && exec python3 "$0" "$@" | |
which python >/dev/null 2>&1 && exec python "$0" "$@" | |
which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" | |
echo "Error: configure wrapper requires python" | |
exec echo "Either install python, or use cmake directly" | |
":""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pdfinfo(infile): | |
""" | |
Wraps command line utility pdfinfo to extract the PDF meta information. | |
Returns metainfo in a dictionary. | |
sudo apt-get install poppler-utils | |
This function parses the text output that looks like this: | |
Title: PUBLIC MEETING AGENDA | |
Author: Customer Support | |
Creator: Microsoft Word 2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gzip | |
import logging | |
_logger = logging.getLogger(__name__) | |
# monkey patch for 2.7 | |
import sys | |
if sys.version_info[:2] == (2, 7): | |
# ripped from py 3.4 gzip module | |
# modified for py 2.7 _read() | |
def read1(self, size=-1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ACTION=$1 | |
PULP_IMAGES=( | |
pulp/mongodb | |
pulp/qpid | |
pulp/base | |
pulp/worker | |
pulp/apache |