Initialize a git repo in the current directory
# git init
Add a remote called "origin"
| version: '2' | |
| services: | |
| traefik: | |
| restart: unless-stopped | |
| image: traefik | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock:ro |
| import logging | |
| class NoExceptionsFormatter(logging.Formatter): | |
| def format(self, record): | |
| record.message = record.getMessage() | |
| if self.usesTime(): | |
| record.asctime = self.formatTime(record, self.datefmt) | |
| return self._fmt % record.__dict__ |
| # Start on recovery mode | |
| # Go on terminal | |
| $ mount -t msdos /dev/disk0s1 /Volumes/ESP. | |
| $ rm -rf /Volumes/ESP/efi/refind | |
| # from http://www.rodsbooks.com/refind/installing.html#uninstalling |
Initialize a git repo in the current directory
# git init
Add a remote called "origin"
| #!/bin/sh | |
| # Generate self signed root CA cert | |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Generate server cert to be signed | |
| openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Sign the server cert |
| Resources: | |
| AccountPasswordPolicyC318930E: | |
| Type: Custom::AWS | |
| Properties: | |
| ServiceToken: | |
| Fn::GetAtt: | |
| - AWS679f53fac002430cb0da5b7982bd22872D164C4C | |
| - Arn | |
| Create: | |
| service: IAM |
| For troubleshooting, two things to first try: | |
| run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg | |
| run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working | |
| If that all looks all right, one next thing to try: | |
| run `brew install pinentry` to ensure you have a good tool installed for passphrase entry | |
| If after that install and you re-try git commit and still get the "failed to sign the data" error: | |
| run `gpgconf --kill gpg-agent` to kill any running agent that might be hung |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| You can create a new empty branch like this: | |
| $ git checkout --orphan NEWBRANCH | |
| --orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry. | |
| The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch. | |
| Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: |