Skip to content

Instantly share code, notes, and snippets.

View JohnathanMarkSmith's full-sized avatar

Johnathan Mark Smith JohnathanMarkSmith

View GitHub Profile
@JohnathanMarkSmith
JohnathanMarkSmith / Git commit editior
Created February 21, 2023 15:32 — forked from S3ak/Git commit editior
How to set git commit editor to sublime
Method 1
git config --global core.editor "'c:/program files/sublime text 3/sublime_text.exe' -w"
Method 2
git config --global core.editor "subl -n -w"
Method 3
$ echo 'alias subl="/cygdrive/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe"' >> ~/.bashrc
@JohnathanMarkSmith
JohnathanMarkSmith / MavenInstall.txt
Last active December 17, 2022 15:20
How to install Maven on Fedora, CentOS, Red Hat and Scientific Linux
How to install Maven on Fedora, CentOS, Red Hat and Scientific Linux
If you are using Fedora, CentOS, Red Hat or Scientific Linux sometimes yum does not have the package for the product you would like to install and Maven is one of them at the time of me writing this blog.
I am going to show you how I install Maven on Fedora, CentOS, Red Hat or Scientific Linux you can do it the same way or find a better way.
Download Maven and untar it.
The first thing we need to do is to download the Maven tar file and untar it to a shared location on the workstation
wget http://mirrors.gigenet.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz

NOTICE

IMPORTANT: This guide is for the old 2.x version of gitolite, which is(as of April 22nd 2012) the one found in most OS package repositories. Please consider using the current 3.x branch of gitolite, for which a very nice howto is written by the author.

Introduction

This is a quick walkthrough on how to install and begin using gitolite in under a minute(only 4 commands!). Just follow along through the shell blocks. Reading the gitolite docs is STRONGLY recommended.

Assumptions

bin
build
.metadata
*~
target/
*.imi
*.iml
.idea/
.idea
.DS_Store
@JohnathanMarkSmith
JohnathanMarkSmith / How to concat string in mysql
Last active December 17, 2015 02:09
How to concat a string in mysql
update table set field = concat(field,".value") where key_id != 0;
@JohnathanMarkSmith
JohnathanMarkSmith / LoadMySQL
Created May 6, 2013 13:30
How to load MySQL Database from Command Line in Linux
I been getting asked, How can I load my MySQL database from the command line?
So I am going to make this quick and easy…
First cd in the folder where your sql file is, for this demo I am using a file called “backup.mysql”. Then use the following command
mysql --user root --password regandb < backup.mysql
MySQL will prompt you for a password then your mysql will be loaded depending on how big your backup/file is it may take some time. You could add a -f flag if your database is very big, it will prevent it from stopping if there is error.
@JohnathanMarkSmith
JohnathanMarkSmith / ApacheInstall.txt
Last active December 16, 2015 15:19
How to install Apache2 and PHP on Fedora, CentOS, Red Hat and Scientific Linux
How to install Apache2 and PHP on Fedora, CentOS, Red Hat and Scientific Linux
If you are using Fedora, CentOS, Red Hat or Scientific Linux I am going to show you the basic install of Apache2 and PHP using yum.
Install Apache2.
To install Apache2 just enter the following command:
yum install httpd
SELECT 'Hello, MySQL World!' AS Message
@JohnathanMarkSmith
JohnathanMarkSmith / OpenJDKInstall.txt
Last active December 16, 2015 15:19
How to install Java Open JDK 1.7 on Fedora, CentOS, Red Hat and Scientific Linux
How to install Java Open JDK 1.7 on Fedora, CentOS, Red Hat and Scientific Linux
I had some coworkers asking the same question time and time again “How Do I Install Java Open JDK 1.7?”.
So to make it easy once again here is my post and the details on how to do it.
su -c "yum install java-1.7.0-openjdk*"
Thats all you have to do… stop asking… :)
@JohnathanMarkSmith
JohnathanMarkSmith / CloneLocalGit.txt
Last active December 16, 2015 15:19
How to clone a local Git Repository
oHow to clone a local Git Repository
I get asked a good number of times “How do I clone a local Git Repository?”. So do make it easy I am going to pust it on my blog site so I can just follow the link to in. are you ready??
This worked for me:
git clone file:////<host>/<share>/<path>
For example, if your main machine has the IP 192.168.10.51 and the computer name main, and it has a share named code which itself is a git repository, the both of the following commands should work equally: