Download XAMPP/LAMPP (Linux + Apache + MariaDB + PHP + Perl) from Apache Friends: https://www.apachefriends.org.
Change the permissions to the installer
chmod 755 xampp-linux-[your version type and number goes here]-installer.run
Run the installer
To start LAMP
sudo /opt/lampp/lampp start
To stop LAMP
sudo /opt/lampp/lampp stop
Graphical tool to manage your servers
sudo ./manager-linux.run (or manager-linux-x64.run)
http://localhost in your web browser.
Change ownership of htdocs
sudo chown -R username:username /opt/lampp/htdocs [Replace username with your own username]
Update httpd.conf file
sudo gedit /opt/lampp/etc/httpd.conf
In the file, find the following lines:
Replace nobody with your username and save the file.
Now you can create, delete, and manage files / folder in htdocs folder. To test it, open the opt/lampp/htdocs folder and create some files.
Sometimes I want to open a file in a specific application from the terminal. Using Linux, there are two easy options.
However, sometimes you don’t know the exact name of the application. In these situations, xdg-open is useful.
You can also create a global .gitignore file, which is a list of rules for ignoring files in every Git repository on your computer. For example, you might create the file at ~/.gitignore_global and add some rules to it.
# Declare the global .gitignore
git config --global core.excludesfile ~/.gitignore_global
# Create the .gitignore_global file
If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. In those cases, you must untrack the file first, by running the following command in your terminal:
git rm --cached -r FILENAME
How can I copy and paste data into R? For example, you see a small data set on the web, perhaps in a blog or here on StackOverflow, and you want that data set in your R session. This is a common task for many of us, and there are several ways to go about. Below I present a solution based on this blog post that I have found useful.
First, copy (e.g. “⌘ + C”) the data set.
Then, paste (e.g. “⌘ + V”) to create an R character vector:
x <- " A B C D
1: 2 2 5 3
2: 2 1 2 3
3: 3 4 4 3"
Next, use the read.table() function:
y <- read.table(text = x, header = TRUE)
Done! The data is now in a data frame: