Skip to content

Instantly share code, notes, and snippets.

View ahcode0919's full-sized avatar
🏠
Working from home

A. Hinton ahcode0919

🏠
Working from home
  • Worldwide
View GitHub Profile
@ahcode0919
ahcode0919 / git-cheatsheet.md
Last active May 14, 2020 07:14
Common Git Commands

Git Cheatsheet

Global

  • Create origin branch when creating branch git config --global branch.autosetupmerge always
  • Add ssh key to keychain to eliminate retyping in password ssh-add -K ~/.ssh/id_rsa

Add files

  • Add All Files - git add .
@ahcode0919
ahcode0919 / ruby-cli-gem.md
Last active August 15, 2019 03:42
How-to Create a Ruby CLI Gem

How-to Create a Ruby CLI Gem

Pre-Setup

  1. Create a RubyGems Account
  2. Install RVM (Ruby Version Manager) : RVM
  3. Install Bundler: gem install bundler

Project Creation

@ahcode0919
ahcode0919 / git-author.sh
Last active August 30, 2019 00:06
Rewrite Email / Name for commits (Doesn't change dates)
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="email
CORRECT_NAME="name"
CORRECT_EMAIL="email"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@ahcode0919
ahcode0919 / es6_import_export.md
Last active September 11, 2019 23:21
ES6 Import Export

ES6 Import / Export

Named Exports / Imports

Exports

// source.js
export function add(a, b) { return a + b; }
export function subtract(a, b) { return a - b; }
@ahcode0919
ahcode0919 / Simctl.md
Last active June 8, 2024 11:49
Apple Simctl commands

Simctl

An Xcode/CoreSimulator command line utility to control iOS Simulators on MacOS

Command Usage

simctl [--set <path>] [--profiles <path>] <subcommand> ... simctl help [subcommand]

Documented Commands