Git Product home page Git Product logo

automated-devops's Introduction

Table of Contents

List of git commands that are frequently used

The following shell scripts list all functions that contain all git commands

  1. updateGitBranch.sh - Push all commits to master repository
  2. newGitBranch.sh - Create a new branch and push it straight to the remote repository
  3. deleteGitBranch.sh - Delete a specific branch in a repository and push it to the remote repository (make sure that you have commited to the remote or stash, and are not in the to-be-deleted branch)

New Git Commands via Tokens

git remote set-url origin https://<token_number_here>@github.com/lnugraha/repository_name.git
git push -u origin main

Hard Reset Branch

git reset --hard <version_number>

Add and Commit before Pushing to Remote Branch

git commit -am "Write your comments here!"

Clone a Specific Branch of a Repository

git clone -b develop git@repository_full_address_here.git

List of UNIX commands that are frequently used

Check the last 25 commands

history | tail -25

Check the last 25 commands that contained the aforementioned keyword

history | grep echo | tail -25

Kill a specific running process

ps -au
kill -9 process_number_to_be_killed

List of OSX command lines that can be helpful

Enable or Disable Start-Up Chime (Pre macOS 11.0)

// Enable start-up chime
sudo nvram BootAudio=%01

// Disable start-up chime
sudo nvram BootAudio=%00

Enable of Disable Power Chime (only when plugging MacBooks to a charging cable)

// Enable power chime
defaults write com.apple.PowerChime ChimeOnAllHardware -bool TRUE; open /System/Library/CoreServices/PowerChime.app & 

// Disable power chime
defaults write com.apple.PowerChime ChimeOnAllHardware -bool FALSE; killall PowerChime

Listen to Power Chime

// This sound indicates that your MacBook is charging upon plugging in power cables
afplay /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

Enable or Disable Power On through Opening Lid

// Enable boot-up by lid-lifting (default configuration)
sudo nvram AutoBoot=%03

// Disable boot-up by lid-lifting 
sudo nvram AutoBoot=%00

Remove shadow effect on screenshot

// Disable shadow effect
defaults write com.apple.screencapture disable-shadow -bool TRUE

// Enable shadow effect (default configuration)
defaults write com.apple.screencapture disable-shadow -bool FALSE

automated-devops's People

Contributors

lnugraha avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.