Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Hall unrivaledcreations

View GitHub Profile
@unrivaledcreations
unrivaledcreations / Git Cookbook.md
Created Nov 7, 2021
Git Cookbook: Reference cheat sheet of my most-used, most-needed Git commands, organized into categories: Initial setup tasks, repository management, branches, tags, and stashes.
View Git Cookbook.md

Git Cookbook

Initial Setup Items

Task Command
Initial git setup git config --global user.name {your name}
git config --global user.email {your email}
git config --global core.fileMode false
git config --global push.default simple
echo .DS_Store >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
ssh create key ssh-keygen -t rsa
ssh list keys ssh-add -l
ssh convert to .pem openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 600 id_rsa.pem
@unrivaledcreations
unrivaledcreations / Beginners Git Cookbook.md
Created Oct 14, 2021
A beginner's Git cookbook, showing the most common Git commands one might use when working in a Git repository.
View Beginners Git Cookbook.md

Beginner's Git Cookbook

Here are the most used and most common Git commands. This text assumes your primary branch is called main.

Command Effect
git status Will report the status of files changed on the local filesystem. Always check this status before messing around with checkouts, branches, pushes, pulls, etc.
git checkout -b {branch} Create, and switch over to a new branch; this is how you make a new branch to work in.
git checkout {branch} Goes to an existing branch; e.g., git checkout main.
git branch See a list of branches.
@unrivaledcreations
unrivaledcreations / ext-xdebug.ini
Created May 3, 2021
`ext-xdebug.ini` for use with Laravel Valet.
View ext-xdebug.ini
zend_extension=/usr/local/Cellar/php/8.0.5/pecl/20200930/xdebug.so
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
xdebug.discover_client_host=true
xdebug.default.idekey=PHPSTORM
@unrivaledcreations
unrivaledcreations / fizzbuzz.py
Created Nov 3, 2017
FizzBuzz Solution in Python
View fizzbuzz.py
def fizzbuzz(n):
answer = ''
fizz = not n % 3
buzz = not n % 5
if (fizz):
answer += 'Fizz'
if (buzz):
@unrivaledcreations
unrivaledcreations / config-locations-sample.yaml
Created Mar 6, 2017
Fixed locations section of a puphpet/puphpet config.yaml file; demonstrates nginx locations configuration fix.
View config-locations-sample.yaml
locations:
nxvl_awesome_location1:
location: /
try_files:
- $uri
- $uri/
- /index.php$is_args$args
fastcgi: ''
fastcgi_index: ''
fastcgi_split_path: ''
@unrivaledcreations
unrivaledcreations / config.yaml
Created Mar 3, 2017
puphpet/puphpet config.yaml file, demonstrates stock install which fails to load awesome.dev or awesome.dev/index.html
View config.yaml
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1604-x64
box_url: puphpet/ubuntu1604-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers: