Tagged: my_notes

Git Basics

I sometimes develop websites for personal interests or for friends. Since I'm the only one to work on them, I did not really pay too much attention on version control. But there was a small project that I worked for my friend, which required me to look into a version control system (because he who has no coding experience also wanted to help updating source codes).

I once tried to learn subversion but couldn't really get the hang of concepts of trunks, branching, etc... So, I didn't want to try subversion. Then I met git.

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

Git First-time System Setup:

After installing, execute below commands to set up the system. This is done only one time: $ git config --global user.name "user-name" $ git config --global user.email user@email.com $ git config --global core.editor "gvim -f"

First-time Repository Setup

These steps are necessary each time a new repository is created. First, navigate to the root directory of the website/applicew repository: $ git init Initialized empty Git repository in /home/<username>/www/<project_name>/.git/

By default, Git tracks the changes of all the files, but we can use .gitignore that locates in the application root directory to control what to track. $ vim .gitignore ----------------------------------------- # Ignore bundler config /.bundle # Ignore the default SQLite database. /db/*.sqlite3 # Ignore all logfiles and tempfiles. /log/*.log /tmp # Ignore other unneeded files. doc/ *.swp * ̃ .project

More to come...!
-gibb

AIX: HOWTO: Apply Patch(es)

This is a collection of AIX tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

  1. Always run the inutoc command to ensure the installation subsystem will recognize the new fix packages you download. This command creates a new .toc file for the fix package. Run the inutoc command in the same directory where you downloaded the package filesets. For example, if you downloaded the filesets to /usr/sys/inst.images, run the following command: # inutoc /usr/sys/inst.images

  2. For selected updates
    To install selected updates from this package, use the following command: # smit update_by_fix

  3. For all updates
    To install all updates from this package that apply to the installed filesets on your system, use the following command: # smit update_all It is highly recommended that you apply all updates from this package.

  4. Reboot the system. A reboot is required for this update to take effect.
  5. That's all!
    -gibb

AIX: gzip File Too Large Error

This is a collection of AIX tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

gzip File Too Large Error

# gzip -d *.tar.gz

gzip: *.tar: File too large

When this happens, it's possible that your system's ulimit value prevents from creating a large file. Execute the `ulimit` command: # ulimit -a < - report all current resource limits # ulimit -f unlimited <- set file resource to unlimited

That's all!
-gibb

Switch-Router: HOWTO: Set Password

This is a part of collection of Switch/Router tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

Login Password On Catalyst 5500 columbia> en columbia> (enable) set password Enter old password: Enter new password: Retype new password: columbia>

Privilege Mode Password On Catalyst 5500 columbia> en columbia> (enable) set enablepass Enter old password: Enter new password: Retype new password: columbia>


That's all!
-gibb

Switch-Router: HOWTO: Enable/Disable Ports (CISCO Catalyst 2900)

This is a part of collection of Switch/Router tips from the time I worked as system admin:

Disclaimer:
The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

Enabling Ports for CISCO Switch
Login to cisco switch cisco2900switch> show cisco2900switch> enable password cisco2900switch# config Configure from terminal, memory, or network [terminal]? t ... cisco2900switch(config)# interface fa0/2

To shutdown port cisco2900switch(config-if)# shutdown

To bring it up cisco2900switch(config-if)# un shutdown


That's all!
-gibb