Posts

Showing posts from August, 2011

Web Deployment With Git

This is my solution to do the following 1) deploy a website from my local machine to my server in one step 2) keep a git repository on the server (mainly to have it as backup) I use a combination of git push and rsync to achieve this. Create git repositories on your local machine and the server. 1) create a bare git repository on the server (this is the repository that will be pushed to) $ mkdir /home/cogan/git_projects/myproject.git $ cd myproject $ git init --bare 2) create a git repository on the development machine (where you will do the deployment from) $ mkdir /home/cogan/projects/myproject $ cd myproject $ git init add a test file to the git repository and commit $ echo "<h1>[G]It Works!</h1>" > test.html $ git add test.html $ git commit -m "initial commit" Set up remote repository 3) On your local machine add the repository on the server as a remote repository called 'web' $ git remote add web ss...

Terminate Scripted Minicom Session

If you start a minicom session with the -S you can automate a minicom session with runscript.  This starts two separate processes, the minicom process and the runscript process.  If you want to close the minicom session when the script is finished, simply calling exit in the runscript isn't enough. To End the minicom session you have to kill the minicom process, using the ! operator within the script to execute an external command. The easiest method is to run ! killall minicom This isn't recommended if you might have multiple minicom processes running.  A better way is to use pkill to target the correct minicom session ! pkill -f "^minicom conf_file -S script_file$" Where conf_file and script_file are the names of your minicom files.  pkill uses a regex to kill the process that you specify. Of course to use pkill you have to be able to generate the script file dynamically, or make sure you always call minicom with the same command when you use it....