title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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 | |
# | |
# Do you have multiple AWS profiles? | |
# Here is how I deal with them. | |
# | |
# Make sure you add "${HOME}/.bash_aws_profile" to your .bashrc or .bash_profile so | |
# all new terminal sessions are updated with your choice. | |
# | |
aws-swap(){ | |
unset AWS_DEFAULT_PROFILE |
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
# Not originally created by me btw. | |
# Handy python timestamp trick | |
function p-timestamp() { | |
python -c 'import sys,time;sys.stdout.write("".join\ | |
(( " ".join((time.strftime("[%Y-%m-%d %H:%M:%S]", time.localtime())\ | |
, line)) for line in sys.stdin )))' | |
} | |
## Custom echo that adds a timestamp | |
function echo() { |
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
# base requirements | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev git sshpass tree | |
sudo easy_install pip | |
sudo -H pip install cryptography | |
# sudo -H pip install ansible==2.1.1.0 if you don't need virtualenv | |
# virtualenv |
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
# This file is: ~/.ssh/config | |
# You may have other (non-CodeCommit) SSH credentials stored in this | |
# config file – in addition to the CodeCommit settings shown below. | |
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
# Credentials for Account1 | |
Host awscc-account1 # 'awscc-account1' is a name you pick | |
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
- Installing Homebrew is effortless, open Terminal and enter :
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
Generate a script to delete all images using the following. Copy paste into chrome console on the registry page of a project.
NOTE you must update the textToSave template string before running.
// Options(fill these out with your info)
// GITLAB_INSTANCE is the url to your custom instance or `gitlab.com`
const GITLAB_INSTANCE = 'gitlab.yourwebsite.com'
const GROUP = 'yourGroup'
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
Step by step how to pull a private DockerHub hosted image in a Kubernetes YML. | |
export DOCKER_REGISTRY_SERVER=https://index.docker.io/v1/ | |
export DOCKER_USER=Type your dockerhub username, same as when you `docker login` | |
export DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login` | |
export DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login` | |
kubectl create secret docker-registry myregistrykey \ | |
--docker-server=$DOCKER_REGISTRY_SERVER \ | |
--docker-username=$DOCKER_USER \ |
OlderNewer