Skip to content

Instantly share code, notes, and snippets.

View unrivaledcreations's full-sized avatar

Michael Hall unrivaledcreations

View GitHub Profile
@unrivaledcreations
unrivaledcreations / Git Cookbook.md
Last active February 28, 2022 19:17
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.

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 October 14, 2021 00:36
A beginner's Git cookbook, showing the most common Git commands one might use when working in a Git repository.

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 17:47
`ext-xdebug.ini` for use with Laravel Valet.
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 November 3, 2017 22:05
FizzBuzz Solution in Python
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 March 6, 2017 14:45
Fixed locations section of a puphpet/puphpet config.yaml file; demonstrates nginx locations configuration fix.
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 March 3, 2017 02:20
puphpet/puphpet config.yaml file, demonstrates stock install which fails to load awesome.dev or awesome.dev/index.html
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/ubuntu1604-x64
box_url: puphpet/ubuntu1604-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers: