|
101
|
Main Area and Open Discussion / General Software Discussion / Re: Screenshot Captor... cm vs. in
|
on: March 27, 2012, 09:53:43 AM
|
Is there a way to set SC to always capture in inches?  I haven't been able to locate the setting.  If it can't be set... maybe it could be added to a future update?  Hi Crabby! I think what people are saying is that Screencaptor does not decide to capture in inches or milimeters. It is Paint Shop pro that decides to convert the pixels to either inches or milimeters. Maybe someone that knows Paint Shop Pro can help investigate whether that is a setting you can change. Good luck. So the answers to both your original quetions are no, but maybe with some help you can still get what you want. 
|
|
|
|
|
106
|
Other Software / Developer's Corner / EasyGit - Sane syntax for git
|
on: March 26, 2012, 08:23:47 AM
|
A better commandline interface for git! The primary reason why I have been using mercurial over git is that mercurial is so much higher level and logical to understand. But with EasyGit the commands are almost identical: In short, Easy GIT is a single-file wrapper script for git, designed to make git easy to learn and use.
(Run 'eg help --all' for a more detailed list.) Creating repositories eg clone Clone a repository into a new directory eg init Create a new repository Obtaining information about changes, history, & state eg diff Show changes to file contents eg log Show history of recorded changes eg status Summarize current changes Making, undoing, or recording changes eg commit Record changes locally eg mv Move or rename files (or directories or symlinks) eg revert Revert local changes and/or changes from previous commits eg stage Mark content in files as being ready for commit Managing branches eg branch List, create, or delete branches eg merge Join two or more development histories (branches) together eg switch Switch the working copy to another branch Collaboration eg pull Get updates from another repository and merge them eg push Push local commits to a published repository Time saving commands eg bisect Find the change that introduced a bug by binary search eg stash Save and revert local changes, or apply stashed changes Additional help: eg help COMMAND Get more help on COMMAND. eg help --all List more commands (not really all) eg help topic List specialized help topics. (Detailed list of differences between eg and git) from HackerNews
|
|
|
|
|
107
|
Main Area and Open Discussion / General Software Discussion / Simple outgoing email system PART8
|
on: March 26, 2012, 06:05:34 AM
|
Let's get a working outgoing email system working next. If you want to set it up like me you will require a gmail.com mail account, but you should be able to adapt this to any existing email setup pretty easily. We will setup a simple satellite system using postfix and then send an email using mutt. Let's install mutt (which installs postfix) Now the postfix setup wizard starts. If you want to reconfigure postfix at a later date you can run sudo dpkg-reconfigure postfix[ copy or print] Type of mail server : Satellite System Mail Name : example.org (the name you want on your outbound mail) SMTP relay host : smtp.gmail.com Postmaster : blank Other destinations : blank Synchronous Queues : no Network blocks to allow relay : default Mailbox size : default Local address : default Listen Address : all We will need to enable TLS and passwords out outgoing connections next: [ copy or print] cp /etc/postfix/main.cf ~/backup sudo nano /etc/postfix/main.cf Add the following lines at the end of the file: Formatted for Generic Code with the GeSHI Syntax Highlighter [ copy or print] smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous
Create the sasl_password file by running the following (substitute username and password) [ copy or print] echo "smtp.gmail.com username@gmail.com:password" | sudo tee /etc/postfix/sasl_passwd Apply the configuration: [ copy or print] sudo postmap /etc/postfix/sasl_passwd && sudo service postfix restart Send a test email using mutt and press m for a new mail. Follow the wizard then press y to send. You should receive the mail momentarily. That's everything I can imagine up and running, so you can now install whatever system you want  I'll be playing about with a few projects and post more when I have settled on a system. Feedback is always welcome.
|
|
|
|
|
108
|
Main Area and Open Discussion / General Software Discussion / passwordless logon (PART 7)
|
on: March 25, 2012, 10:43:40 AM
|
Passwordless logon In windows, start PuttyGen, click Generate. Enter a Key Passphrase and remember it - otherwise you won't be able to login. If you plan on storing it on Dropbox so that you can use it from another location, please install BoxCryptor first. It will create a new driveletter for an encrypted dropbox folder that only you can read. You can securely store private keys there. Save the public key as hostname.pub and your private key as hostname.ppk (never allow anyone to copy this). Double click on your hostname.ppk and enter the passphrase to import the private key. Copy your public key into your ubuntu home directory (that's why we have setup samba!). create the folder holding your ssh keys: [ copy or print] mkdir ~/.ssh ssh-keygen -i -f hostname.pub > ~/.ssh/authorized_keys Now. close any putty sessions. Load up your connection and navigate to Connection > SSH > Auth > Browse (under Authentication parameters) and select your private key. Under Connection > Data > "Auto login username" you can enter your username to completely automate login. Don't forget to go back to Session and save the changes. Now login. If everything works you should not have to enter your password. Optionally, we can now disable logging in via password. You can still login to your system using the Ubuntu login screen if you ever lose your keys. [ copy or print] cp /etc/ssh/sshd_config ~/backup sudo /etc/ssh/sshd_config && sudo service ssh restart Search for PasswordAuthentication and change it from yes to noSearch for UsePAM and change it from yes to noVerify you cannot login without a key, using the windows command prompt: Accept the host certificate. enter a password, you should receive: Permission denied (publickey).Congratulations, your logins are now secure and more convenient.
|
|
|
|
|
109
|
Main Area and Open Discussion / General Software Discussion / Re: Setting up static blog (based on movable type) / vm / local development system
|
on: March 25, 2012, 10:09:49 AM
|
SAMBA You will want to install the following software it: * WinSCP - FTP / SSH file manager, to manage your files over SSH ( http://winscp.net/eng/index.php) Although it's convenient to use WinSCP to access your linux files, in other situations you will want to manipulate them as if they're just another windows network share, so you can use the context menu, edit files in your favourite editor etc. For this we need to setup a Samba File Server. For a complete guide and more background information, bookmark the Ubuntu Documentation. https://help.ubuntu.com/1...e/C/samba-fileserver.htmlTip: I recommend that if at all possible, your windows username and password and ubuntu's user and password are identical. This will transparently authenticate you to samba. Otherwise you will have to enter your username and password once each session. Not a big problem. Install Samba and libpam-smbpass. The latter will sync your linux login credentials with samba's (shares can have their own username and password): Let's create a stripped samba configuration and edit it: [ copy or print] cd /etc/samba cp smb.conf ~/backup sudo mv smb.conf smb.conf.master testparm -s smb.conf.master | sudo tee smb.conf sudo nano smb.conf && sudo restart smbd && sudo restart nmbd Delete the [printers] and [print$] sections completely. Then at the end of [global] add: Formatted for Generic Code with the GeSHI Syntax Highlighter [ copy or print] security = user encrypt passwords = true [homes] comment = Home Directories browseable = yes valid users = %S read only = no
This exposes user's home directories and will let only those users access them. The following might not be necessary, but I've had a bit of trouble with incorrect credentials being saved before, so just to be on the safe side we will turn off the VM: Close the VM. Reboot your windows pc, and restart the VM again. Try browsing to \\<server>\<username> (in my case: \\devvy\sander) . In your home directory, create a new text document with a few words. Now in the SSH session list the contents of the folder it is in: If everything is working correctly the username that owns the textfile is your linux user. This means you will not have any strange permission issues later on. Congrats you can now read and write to your home directory.
|
|
|
|
|
111
|
Main Area and Open Discussion / General Software Discussion / Re: best WYSIWYG html editor
|
on: March 25, 2012, 08:11:08 AM
|
If you want to make sites that way: still dreamweaver. Alternatively you can try Microsoft Expression Web, it's quite good from what I can tell (not used it myself). If you want to make better sites: gradually switch to Dreamweavers code view or switch to a good programming editor such as Sublime Text, or HTML Kit even. If you write html content, learn markdown as it is faster and plain text and converts into html. I've written an online markdown editor, but there are many.
|
|
|
|
|
113
|
Main Area and Open Discussion / General Software Discussion / Re: Setting up static blog (based on movable type) / vm / local development system
|
on: March 25, 2012, 07:59:44 AM
|
Made another two minor edits, corrected the hostname edit call, and I noticed I missed out a 'click step' in selecting the best server for your updates. @40hz I selected movable type (no e after mov btw) because most static blogging systems require you to know the language in which they have been written as they are not as polished (and if that is ruby for example then I'm stuck), as well as knowing that movable type can be used not just for blogs but complete websites and even code generation using its publishing tool - being able to generate the code for a php website might be something I'm interested in. Also using MT as a CMS might be useful for my dayjob  So for me it would be learning learning to customize it. It's one of the original blogging software that is still being updated, is well supported, supports markdown + smartypants for writing, has a straightforward admin interface (when you realise a website can have multiple blogs (news,events etc)) and in my experiments I was able to load up a published blog on a shared host by disabling search, comments, trackbacks and renaming the absolute urls. I'll get to this later. Second Crack looks interesting and I might settle on that, however it's currently in alpha, developed as a personal project instead of as a platform for others, so there's no support. However it will be easier to install (no perl modules), 'admin interface' is playing with text files and is written specifically to address a static blog. Hope that helps.
|
|
|
|
|
114
|
Main Area and Open Discussion / General Software Discussion / Re: Setting up static blog (based on movable type) / vm / local development system
|
on: March 23, 2012, 09:05:20 AM
|
PHP should be working as expected. Test this by creating a php file. Navigate to your test site's public_html directory and execute: Load up the page /phpinfo.php on your testsite in your browser. Search the page for rewrite - Note that mod_rewrite is not enabled as it is not listed. As there can be multiple php.ini's on your system, make a note of the location of php.ini (see 'Loaded configuration file'). Let's enable an apache module, mod_rewrite: You will have noticed the following warning when apache2 restarted: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerNameBy default Ubuntu doesn't specify a ServerName in the Apache configuration, because it doesn't know what the name of your server is. It tries a reverse lookup on your IP address, which returns nothing, so it just has to use the IP address as the name. To fix it, either add a ServerName directive with the hostname of your VM outside of any virtual host - e.g. in /etc/apache2/httpd.confOn my server (devvy) I executed the following: [ copy or print] echo "ServerName devvy" | sudo tee /etc/apache2/httpd.conf On a development box, we want to see all php error details so we can do something about it. So lets display them: [ copy or print] cp /etc/php5/apache2/php.ini ~/backup/php.ini sudo nano /etc/php5/apache2/php.ini Search for display_errors = Off and change Off to On. Well done! Now you can create multiple project sites for apache, configure mysql securely, and setup PHP! You're on your way to have a basic local development server! Next we'll have to make your home directory available over a network share so you can manage the files from windows (using samba), we will setup passwordless SSH. Any other suggestions are welcome. Apart from samba and passwordless login, I can't think what else to setup but I will revise previous posts if additional steps make more sense there.
|
|
|
|
|
116
|
DonationCoder.com Software / Screenshot Captor / Re: Screenshot Captor Auto Tool Configurations
|
on: March 22, 2012, 11:30:01 AM
|
Here's a PNGGauntlet tool menu entry: http://dl.dropbox.com/u/7...ctools/PNGGauntlet.sctool[ copy or print] title = PNGGauntlet - Optimize app = %ProgramFiles%\PNGGauntlet\PngGauntlet.exe params = "%file%" iconfile = @ title = PNGGauntlet - Optimize (Plain) app = %ProgramFiles%\PNGGauntlet\PngGauntlet.exe params = "%fileplain%" iconfile = PngGauntlet is a free tool to optimize the filesize of your images without sacrificing quality: Combines PNGOUT, OptiPNG, and DeflOpt to create the smallest PNGs. No image quality is lost - only file size. Converts JPG, GIF, TIFF, and BMP files to PNG . Ultra-configurable Examples: A chrome extensions scrolling screenshot was optimized to 73% of its original size (png 16m) A screenshot of my dual monitor workspace was optimized to 72% of its original size (png 16m - 3840x1080 - 947kb) This is a great tool to run on your images before you publish your website, as it can make your site faster to load without any disadvantages.
|
|
|
|
|
121
|
Main Area and Open Discussion / General Software Discussion / Tips / AMP / Virtual Sites
|
on: March 21, 2012, 08:58:30 AM
|
The following assumes that you have a working SSH connection (alternatively use the terminal app) You will need the following software: HostEditor7 or HostMan ( http://www.donationcoder....m/index.php?topic=27355.0) TIPS First, a nice tip: create a place for future shell scripts and add it to your local path [ copy or print] mkdir ~/bin sudo echo "export PATH=$PATH:~/bin" >> ~/.bashrc I find it handy to install the following: * support for unzipping archives * lynx text browser for troubleshooting browsing via shell INSTALL APACHE & PHP Install the Apache Webserver with documentation, and PHP including secure suhosin 'advanced protection system' [ copy or print] sudo apt-get install apache2 apache2-doc apache2-utils sudo apt-get install libapache2-mod-php5 php5 php-pear php5-xcache php5-suhosin MYSQL Next up is mysql server and hooks for php You will be prompted for a root password, make sure to note it. Test the configuration, then exit, and ensure you can login: After installing MySQL, it's recommended that you run mysql_secure_installation in order to help secure MySQL. It is recommended that you accept the program's default answers. If you are prompted to reload privileges, select "yes." Run the following command to execute the program. After running mysql_secure_installation, MySQL is secure and can be restarted: [ copy or print] sudo mysql_secure_installation && sudo restart mysql APACHE - SETUP VIRTUAL SITES FOR YOUR WEB PROJECTS I've created the following script that will make it really easy to setup a new website: Formatted for Generic Code with the GeSHI Syntax Highlighter [ copy or print] #!/bin/bash # version 1.0.0 - 21 march 2012 read AVS_HOSTNAME echo "Specify webmaster email for '${AVS_HOSTNAME}':" read AVS_WEBMASTER echo "Generating directories in ${HOME}/projects/${AVS_HOSTNAME}..." mkdir $HOME/projects /$AVS_HOSTNAME/public_html -p mkdir $HOME/projects /$AVS_HOSTNAME/logs echo "Hello World! Another site saved." | tee $HOME/projects /$AVS_HOSTNAME/public_html /index .html echo "Generating virtual host file:" <VirtualHost *:80> ServerAdmin ${AVS_WEBMASTER} ServerName ${AVS_HOSTNAME} DocumentRoot ${HOME}/projects/${AVS_HOSTNAME}/public_html/ ErrorLog ${HOME}/projects/${AVS_HOSTNAME}/logs/error.log CustomLog ${HOME}/projects/${AVS_HOSTNAME}/logs/access.log combined </VirtualHost> " | sudo tee /etc/apache2/sites-available/$AVS_HOSTNAME echo "Virtual Host file saved to /etc/apache2/sites-available/${AVS_HOSTNAME}" echo "Enabling site and reloading apache..." sudo a2ensite $AVS_HOSTNAME sudo service apache2 reload
It performs the following tasks: * asks you for the hostname and webmaster email * creates the required directories in your home www folder * generates a working basic virtual hosts file and saves it in the correct location * enables the new site * reloads apache with the configuration changes open nano again and copy and paste the script into the file, then ctrl-x, y to save changes : You can now run the following command to setup a new site (mind the spacing and dot): To make Windows aware of the new hostname add a line to your hosts file using HostEditor7. At the end of the file add the ip address of your VM followed by a space and the hostname/virtual site you created. Open a browser and navigate to the hostname ( http://test.devvy in my case). Congratulations! [attachimg=#]
|
|
|
|
|
122
|
Main Area and Open Discussion / General Software Discussion / Configuring The System A Bit
|
on: March 20, 2012, 08:50:53 AM
|
CONFIGURING THE SYSTEM A BIT You will need the following software: Putty ( http://www.chiark.greenend.org.uk/~sgtatham/putty/) I noticed the clock was set incorrectly, so I searched for Time and opened the Time & Date settings, and selected the correct location. Open a terminal. We will make a backup folder in your home directory where we will copy configuration files to before we edit them: You will want to change the hostname of the VM to something nicer, I choose 'devvy' You will also need to run the following command and change the hostname on the second line from ubuntu to your name. Apply the changes with the following command (you will see the change next time you open a terminal) Now that is out of the way, we can setup openssh in order to connect via ssh from your windows pc. [ copy or print] sudo apt-get install openssh-server fail2ban byobu Fail2ban bans people when they are trying to guess your logins, and does not need to be configured. Byobu is a very helpful way to display system stats such as your ip in your terminal, and also improves on screen by allowing you to resume previous sessions. The default setup of openssh is not as secure as we would like however: [ copy or print] cp /etc/ssh/sshd_config ~/backup sudo nano /etc/ssh/sshd_config It's good practice to change the port number (line 5) to something higher like 2222 as this twarts some automated attacks, in case your VM is ever connected directly to the internet. Also we dont want the root user to login remotely: Search (ctrl-w) for PermitRootLogin and set this to no: We will revisit this file at a later date to setup passwordless login using ssh keys, but for now Restart ssh with: Start Byobu and note your ip address (type exit to end it): Press F9 and choose "Byobu currently launches at login (toggle on)" to enable this handy program for your remote connections. Press escape to exit. Back in windows, start putty, type in that ip address and change the port to whatever you decided above. Under Connection > Data you can enter the auto login username so you will only have to type the password. Navigate back to Session and type your hostname in the Saved Sessions box and press Save to save this session for reuse. Then click Open and login. You will see your session again in byobu! Note that when you type in the putty session the characters show up on your ubuntu desktop. That will do for now, next time we will setup apache, configure it for a multi-site setup, and setup other web software required for many websites. Well done! [attachthumb=#]
|
|
|
|
|
123
|
Main Area and Open Discussion / General Software Discussion / Installing Ubuntu
|
on: March 20, 2012, 07:32:00 AM
|
INSTALLING UBUNTU You will need: Vmware player ( http://www.vmware.com/products/player/ or if you don't want to register: http://filehippo.com/search?q=vmware+player) Ubuntu ( http://www.ubuntu.com/download/ubuntu/download) A Notetaker - I use Evernote - http://www.evernote.com/) Install VMware player (VMP). Restart the pc if necessary. I'm installing the virtual machine on my USB harddisk, this way I can take my whole development with me on the go (home/work) - this is great because you only have to set all this up once, instead of on every machine you plan to use it on. Start VMP and "Create a New Virtual Machine" and browse to the downloaded .iso. As part of the Easy Install Information write down the login: username: password: Store the VM on your removable drive. On the Specify Disk Capacity screen you will want to go higher than the recommended disk size, I chose double (40GB). Make sure you have enough free space available, check this before continueing. I went for double the recommended amount as I want to avoid to repartition later. Accept the other defaults and Ubuntu will start. Keep waiting as Easy Install is installing Ubuntu on your behalf. If you are a chmod 777 user (jackpot settings), this is a great time to read up on file system permissions by reading the article series starting with "Linux File Permission Concepts" (click next in the summary, there are 5 articles in total): http://articles.slicehost...-file-permission-conceptsAfter a restart the login screen appear and after a successful login you will see the desktop. Because we are going to install a bunch of software let's make sure everything we already have is up to date. Start the update manager > Settings > Ubuntu Software > Other > Select Best Server. This will speed up downloads. Check again and install updates. Time to read some more, btw have you created a new tag for all these bookmarks yet? When you are finished reading the above articles, here are some really good resources to read later: http://articles.slicehost.com/sitemaphttp://library.linode.com/http://askubuntu.com/questions?sort=votesYou should now have a running Ubuntu system.
|
|
|
|
|
124
|
Main Area and Open Discussion / General Software Discussion / Setting up static blog (based on movable type) / vm / local development system
|
on: March 20, 2012, 06:48:08 AM
|
|
I'm in the process of setting up a static blog, where all blogging takes place on a local development server running Movable Type, with the resulting static site being pushed to my shared hosting. This has all the benefits of a static blogging system (security, speed,), plus the benefits of Movable Type (robust, easier to theme than wordpress from my initial impresions, power of complete CMS, open source version available / pro version free for individuals).
I'm choosing to do this on a ubuntu 11.10 virtual machine running on VMware player. I thought it would be interesting to document the process and instructions so that it will be useful to others, and you can follow along / correct / improve this guide. Apart from a working static blogging system you will end up with a complete LAMP local development system for other web projects.
Feedback is welcome.
|
|
|
|
|