pip3 install pipenv
pipenv shell
| #!/usr/bin/env python3 | |
| # coding=utf8 | |
| # | |
| # AUTHOR: Jardel Weyrich <jweyrich at gmail dot com> | |
| # | |
| from __future__ import print_function | |
| import re, sys | |
| def parse_alb_log_file(file_path): | |
| fields = [ |
| #deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
| # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
| ## Major bug fix updates produced after the final release of the | |
| ## distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted |
| #!/bin/bash | |
| # A script to backup GitLab repositories. | |
| GLAB_BACKUP_DIR=${GLAB_BACKUP_DIR-"gitlab_backup"} # where to place the backup files | |
| GLAB_TOKEN=${GLAB_TOKEN-"YOUR_TOKEN"} # the access token of the account | |
| GLAB_GITHOST=${GLAB_GITHOST-"gitlab.com"} # the GitLab hostname | |
| GLAB_PRUNE_OLD=${GLAB_PRUNE_OLD-true} # when `true`, old backups will be deleted | |
| GLAB_PRUNE_AFTER_N_DAYS=${GLAB_PRUNE_AFTER_N_DAYS-7} # the min age (in days) of backup files to delete | |
| GLAB_SILENT=${GLAB_SILENT-false} # when `true`, only show error messages | |
| GLAB_API=${GLAB_API-"https://gitlab.com/api/v3"} # base URI for the GitLab API |
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
/usr/local/etc/dnsmasq.confaddress=/local/127.0.0.1
| #!/bin/bash | |
| # source http://stackoverflow.com/questions/23222616/copy-all-keys-from-one-db-to-another-in-redis | |
| #set connection data accordingly | |
| source_host=localhost | |
| source_port=6379 | |
| source_db=1 | |
| target_host=localhost | |
| target_port=6379 | |
| target_db=2 |
| # ------------------------------------------------------------------- | |
| # use nocorrect alias to prevent auto correct from "fixing" these | |
| # ------------------------------------------------------------------- | |
| alias foobar='nocorrect foobar' | |
| alias g8='nocorrect g8' | |
| # ------------------------------------------------------------------- | |
| # Ruby stuff | |
| # ------------------------------------------------------------------- | |
| alias ri='ri -Tf ansi' # Search Ruby documentation |
Use Consulate to export and import ACLs from Consul.
Setup your environment before you run these scripts:
export CONSUL_HOST="localhost"
export MASTER_TOKEN="myMasterToken"
Reference:
| #!/bin/bash | |
| # Install dependencies | |
| # older ubuntus | |
| #apt-get install build-essential libsqlite3-dev ruby1.9.1-dev | |
| # xenial | |
| apt install build-essential libsqlite3-dev ruby-dev | |
| # Install the gem | |
| gem install mailcatcher --no-ri --no-rdoc |