Intro to Git
If you’re new to Git checkout https://www.linuxtechi.com/learn-git-command-examples-linux-part-1/ it’s a good starting point.
Read MoreIf you’re new to Git checkout https://www.linuxtechi.com/learn-git-command-examples-linux-part-1/ it’s a good starting point.
Read MoreIf you think it’s possible that someone is linking to images hosted on your site add the following to you nginx config file # Stop deep linking or hot linking location /images/ { valid_referers none blocked www.linuxconsultant.org linuxconsultant.org; if ($invalid_referer) { return 403; } } Or if you want to be a wiseguy and replace the hotlinked image with something else # Stop deep linking or hot linking location /images/ { valid_referers none blocked www.linuxconsultant.org linuxconsultant.org; if ($invalid_referer) { return […]
Read MoreThis site is a collection of tips, examples and small chunks of code I’ve used over the years as I’ve worked with Linux. Mostly the items found here are for my own use but I’ve made the site public in the chance that it will help other people. If you find something useful please let me know. Also if you think something I’ve mentioned could be done better I would welcome the feedback.
Read MoreWant to see if your branch is on the remote server? Want to see what branches are? Run git branch -av Not seeing your branch on the remote server, run git push origin BRANCH_NAME Added a file to .gitignore but you already checked it in? Run git rm –cached FILENAME Changing your origin server? Run git remote remove origin
Read MoreAfter installing MySQL Set the root passwoord using mysqladmin -u root password new-password login as root and run the following comands drop database test; use mysql; delete from db; delete from user where not (host=”localhost” and user=”root”); flush privileges;
Read Moregit config –global user.name “USER_NAME” git config –global user.email “USER_EMAIL” and if you work with Windows files git config –global core.autocrlf false
Read MoreCreate a directory to store all your repos. I like putting them in /var/git-repos cd into /var/git-repos (or whatever you called it) mkdir PROJECT_NAME.git cd PROJECT_NAME.git git init –bare Then Each user works locally (could be on their own system or could be in a personal directory on the same server). Run the following: mkdir PROJECT_NAME cd PROJECT_NAME git init if working on the same server you could use git remote add origin /var/git-repos/PROJECT_NAME.git if working remotely you could use […]
Read MoreNo refs in common and none specified; doing nothing. Perhaps you should specify a branch such as ‘master’. fatal: The remote end hung up unexpectedly Just run git push origin master Or if you get error: src refspec master does not match any. just do git commit -m “initial commit” git push origin master
Read MoreFollow this guys instructions http://daneomatic.com/2010/11/01/svn-to-multiple-git-repos/
Read MoreGo to http://framework.zend.com/download/current/ download the minimal version extract to a directory that makes sense to you add to your .htaccess file RewriteEngine on RewriteBase / RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d php_value include_path “.:REPLACE_WITH_LOCATION_OF_LIBRARY_DIRECTORY”
Read MoreRob Allen has created a simple 18 page tutorial on using Zend that is a great place to get started. You can find the tutorial at http://akrabat.com/wp-content/uploads/Getting-Started-with-Zend-Framework.pdf
Read MoreIf you have a long group of commands you need to run press Ctrl-X, followed by Ctrl-E This will open your default editor. When you’re done close the editor (saving the file) and the command will run.
Read Morehttp://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ see for how to install and use.
Read MoreSomeday I’ll get around to writing something up but until then this guide is pretty good http://www.linuxstall.com/fstab/
Read MoreIf your isp blocks port 25 (it should) redirect traffic coming in on port 2525 to port 25 /sbin/iptables -t nat -I PREROUTING -p tcp –dport 2525 -j REDIRECT –to-port 25 # make it so that this command runs on server boot up. if ! grep -qai 2525 /etc/rc.local; then echo ‘/sbin/iptables -t nat -I PREROUTING -p tcp –dport 2525 -j REDIRECT –to-port 25’ >> /etc/rc.local fi
Read MoreCreate a docker container with a name you choose by including the –name=”NAME” option for example you could use docker create –name=”kilroy” ubuntu:latest
Read More