topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday September 11, 2024, 2:46 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - justice [ switch to compact view ]

Pages: prev1 2 3 4 5 6 [7] 8 9 10 11 12 ... 76next
151
General Software Discussion / Static website generator for windows
« on: March 25, 2012, 08:57 AM »
I'm looking for website generators for windows. Do you know any besides CityDesk?

152
General Software Discussion / Re: best WYSIWYG html editor
« on: March 25, 2012, 08:11 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.


153
Guys if you are thinking of following what I have done so far: including downloading, installing and using the instructions you can get to this point in about 1.5 hours (rough guessed based on my not too fast laptop).

I'm lookin at samba next and had to reinstall so used these instructions :D

154
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.

155
PHP should be working as expected. Test this by creating a php file. Navigate to your test site's public_html directory and execute:
echo "<?php phpinfo(); ?>" > phpinfo.php

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:
sudo a2enmod
rewrite
sudo service apache2 restart

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 ServerName
By 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.conf

On my server (devvy) I executed the following:
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:
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.





156
Changes to above posts:
I've corrected the backup location of sshd_config and changed references to ~/www to ~/projects as we want to keep all projects together but they might not be web related. If you have already created addvirtualsite.sh and virtualhostsites be sure to update them.

157
Screenshot Captor / Re: Screenshot Captor Auto Tool Configurations
« on: March 22, 2012, 11:30 AM »
Here's a PNGGauntlet tool menu entry:
http://dl.dropbox.co...s/PNGGauntlet.sctool

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.

159
Living Room / Re: Recommend some music videos to me!
« on: March 22, 2012, 10:42 AM »
Nerdy:


Funny:


160
Give it, then change the password when you walk out. Pointless.
"Oh maybe you typed it in wrong"

161
What's involved? Do you need sponsors or what's a fundraiser for those who haven't paid attention :D

162
General Software Discussion / Tips / AMP / Virtual Sites
« on: March 21, 2012, 08:58 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 (https://www.donation...ex.php?topic=27355.0)


TIPS

First, a nice tip: create a place for future shell scripts and add it to your local path
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
sudo apt-get install  lynx unzip



INSTALL APACHE & PHP

Install the  Apache Webserver with documentation, and PHP including secure suhosin 'advanced protection system'
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
sudo apt-get install mysql-server php5-mysql

You will be prompted for a root password, make sure to note it.
Test the configuration, then exit, and ensure you can login:
mysql -u root -p

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:
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:

Code: Text [Select]
  1. #!/bin/bash
  2. # version 1.0.0 - 21 march 2012
  3. echo "Specify hostname:"
  4. read AVS_HOSTNAME
  5. echo
  6. echo "Specify webmaster email for '${AVS_HOSTNAME}':"
  7. read AVS_WEBMASTER
  8.  
  9. echo
  10. echo "Generating directories in ${HOME}/projects/${AVS_HOSTNAME}..."
  11. mkdir $HOME/projects/$AVS_HOSTNAME/public_html -p
  12. mkdir $HOME/projects/$AVS_HOSTNAME/logs
  13. echo "Hello World! Another site saved." | tee $HOME/projects/$AVS_HOSTNAME/public_html/index.html
  14.  
  15. echo
  16. echo "Generating virtual host file:"
  17. echo "
  18. <VirtualHost *:80>
  19.     ServerAdmin ${AVS_WEBMASTER}
  20.     ServerName ${AVS_HOSTNAME}
  21.     DocumentRoot ${HOME}/projects/${AVS_HOSTNAME}/public_html/
  22.     ErrorLog ${HOME}/projects/${AVS_HOSTNAME}/logs/error.log
  23.     CustomLog ${HOME}/projects/${AVS_HOSTNAME}/logs/access.log combined
  24. </VirtualHost>
  25. " | sudo tee /etc/apache2/sites-available/$AVS_HOSTNAME
  26. echo "Virtual Host file saved to /etc/apache2/sites-available/${AVS_HOSTNAME}"
  27.  
  28. echo "Enabling site and reloading apache..."
  29. sudo a2ensite $AVS_HOSTNAME
  30. 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 :
nano ~/bin/addvirtualsite.sh

You can now run the following command to setup a new site (mind the spacing and dot):
. ~/bin/addvirtualsite.sh

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!
Snap 2012-03-21 at 13.54.56.png

163
General Software Discussion / Configuring The System A Bit
« on: March 20, 2012, 08:50 AM »
CONFIGURING THE SYSTEM A BIT

You will need the following software:
Putty (http://www.chiark.gr....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:
mkdir ~/backup

You will want to change the hostname  of the VM to something nicer, I choose 'devvy'
echo "devvy" | sudo tee /etc/hostname

You will also need to run the following command and change the hostname on the second line from ubuntu to your name.
cp /etc/hosts  ~/backup
sudo nano /etc/hosts

Apply the changes with the following command (you will see the change next time you open a terminal)
sudo hostname -F /etc/hostname

Now that is out of the way, we can setup openssh in order to connect via ssh from your windows pc.
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:

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:
PermitRootLogin no

We will revisit this file at a later date to setup passwordless login using ssh keys, but for now Restart ssh with:
sudo service ssh restart

Start Byobu and note your ip address (type exit to end it):
byobu

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!
Snap 2012-03-20 at 13.53.03.png

164
General Software Discussion / Installing Ubuntu
« on: March 20, 2012, 07:32 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...arch?q=vmware+player)
Ubuntu (http://www.ubuntu.co...load/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.slic...-permission-concepts

After 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/sitemap
http://library.linode.com/
http://askubuntu.com...questions?sort=votes

You should now have a running Ubuntu system.

165
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.

166
Right click on the file and choose set action, you will be asked to browse to an executable. Sorry!

167
If you are the 1% of people that always wanted to run a program / batch file / autohotkey script when the contents of a file/script/text document/htm/css file changes, and you haven't found a program for it, then you might benefit of the program i've put together today: On Change Run Task.

OCRT is the smallest program that would still be useful for me that I could write using Visual Studio C# 2010 Express. (as it is my first one) I hope you find it useful. Thanks to kyrathaba for making the tutorials that finally got me started :))

Possible use cases:
* run your build batch file to compile and create a installation package whenever your auto hotkey script is updated. (reason why I made this)
* run a script to refresh your browser whenever your CSS changes.
* 1000 possible other obscure uses.

Future development will depend on my continued use and any interest from you. I managed to disable ClickOnce but it still requires .NET Framework 4 Client Profile, which you probably have already installed.

168
I've no experience with gpeasy but AFAIK the uploaded image will get the permissions of the owner of the process the cms is run under (well the upload process technically). So, for example, if gpeasy is run as through CGI then you need to look up what the user is that runs cgi apps under IIS. Maybe that will help?

gpEasy is very easy to install on many different servers. The requirements are PHP [...]
So how is php setup?

169
C# / Re: Some nice C# tutorials by dc member kyrathaba
« on: March 16, 2012, 10:22 PM »
Wanted to say thanks for these useful c# tutorials :)

170
Living Room / Re: App Store fraud
« on: March 16, 2012, 09:07 PM »
On your itunes store receipt you can "report a problem", that's how I got a refund before. Works fine you get a personal reply etc.

171
Living Room / Re: Download appears malicious - Google Chrome
« on: March 16, 2012, 04:03 AM »
Update.
Still not sure how it happened. However, a solution is to join Google Webmaster Tools. After a few days the warning is no longer shown:
http://stackoverflow.com/a/9727960/997

172
Living Room / Re: Quickly see if DoCo is up or down
« on: March 13, 2012, 11:22 AM »

173
Living Room / Re: Download appears malicious - Google Chrome
« on: March 13, 2012, 09:20 AM »
I made sure my executables are not compressed at all, in this case it maybe has to do with the innosetup executable not being signed with a level 2 object code signing certificate?
http://stackoverflow...icious-file-warning/

174
Living Room / Re: Premium Number To Local Rate Number! *(UK)*
« on: March 12, 2012, 09:43 AM »
I'm sure it's fine but you don't want to think you are calling your bank and instead call a fraudster and give out personal information. That's why I was asking. :) Just research the phone number before you call it.

175
Living Room / Re: Premium Number To Local Rate Number! *(UK)*
« on: March 12, 2012, 07:14 AM »
How do you find out when calling an 0870 number what the equivalent local one is? AFAIK it doesn't show up on your phone. So if it is not possible how are these phone numbers added / verified?

Pages: prev1 2 3 4 5 6 [7] 8 9 10 11 12 ... 76next