Posts

Showing posts with the label File

Server Selfie.

Image
My old server can do a lot of things s evidenced by http://www.instructables.com/id/Uses-for-your-own-private-cloud/ In fact a few of the virtual sites are: Makes me so proud the server can do so many things. So here is a server selfie.

Just a new package.

Image

Command line sql database setup.

Image
This is just enough to hang yourself with. #========================================================================== # pseudo-code or generic instructions to set up a lamp web server apps on # Debian based lamp servers you will have to modify it to your needs. # this is assuming a lamp server is already properly set up. # Setup is another discussion. # all rights unreserved by the unknown admin #************************************************************************** # Get file from internet chances are you visited the sit and have the # location of the file to be downloaded. # use Curl for a directory or wget for a single file. use the man pages for # additional instructions wget $website/$subdirectory/$filename # Extract the file in the home directory (not the destination filename for use # in the next step. tar zxvf filename.tar.gz # move the directory into the web document root for use with http # webappdirectory will become webappname sudo...

Network file copy.

Image
If you are only using command line systems, you have to use the keyboard as part of copying file method. But there is actually, sort of an easier method. You will need to have the  following installed on the systems: openssh-server, fuser, and sshfs for starters.  The easiest way to set up a share is to go to the browser and use the sftp protocol (vs ftp or http) to point to the share.  Notice there are not shares set up yet. and again the file we want to copy is servers.txt.   Now you should see the share in the lower left hand side window. Now you want to drag and drop the file. That's all.

Cat eyes.

Image
Want to see what is in a file in your computer, just use a cat.

File permissions web app source code.

Image
Source code for the file permissions application shown a while back. < html > < body > < script type =" text/javascript "> <!-- /* chmod helper, Version 1.0 * by DK of able-design * Last Modified: recently */ function do_chmod(user) { var field4 = user + "4"; var field2 = user + "2"; var field1 = user + "1"; var total = "t_" + user; var symbolic = "sym_" + user; var number = 0; var sym_string = ""; if (document.chmod[field4].checked == true) { number += 4; } if (document.chmod[field2].checked == true) { number += 2; } if (document.chmod[field1].checked == true) { number += 1; } if (document.chmod[field4].checked == true) { sym_string += "r"; } else { sym_string += "-"; } if (document.chmod[field2].checked == true) { sym_string += "w"; } else { sym_string += "-"; } if (document.chmod[field1].checked == true) { sym_st...

Server script.

Image
Wrote this script a while back to use the server to get information for me. Here is a newer incarnation of that same script. #!/bin/sh echo “Content-type: text/html\n” # read in our parameters CMD=`echo “$QUERY_STRING” | sed -n ‘s/^.*cmd=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”` FOLDER1=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder1=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER2=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder2=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER3=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder3=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER4=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder4=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER5=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder5=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER6=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder6=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER7=`echo “$QUERY...

Server script.

Image
Wrote this script a while back to use the server to get information for me. Here is a newer incarnation of that same script. #!/bin/sh echo “Content-type: text/html\n” # read in our parameters CMD=`echo “$QUERY_STRING” | sed -n ‘s/^.*cmd=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”` FOLDER1=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder1=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER2=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder2=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER3=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder3=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER4=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder4=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER5=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder5=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER6=`echo “$QUERY_STRING” | sed -n ‘s/^.*folder6=\([^&]*\).*$/\1/p’ | sed “s/%20/ /g”| sed “s/%2F/\//g”` FOLDER7=`echo “$QUERY...

Getting files to a handheld.

Image
After playing with my Nexus 7 for a while, I wanted to transfer some files to the unit. There were programs such as a spreadsheet that I wrote to work with qbasic.  Dosbox will certainly run qbasic.  Since Adosbox was available for Android I went and downloaded that. So far so good. Or so I thought.  Now how do I get the files to the Nexus 7. Can not use a usb drive. Hmmm. You pay for and then download an application that would get your files from a usb stick without being root. Why should I pay for something that should of come with the unit to begin with.  Now it is time to think out of the box. Well if I can download files from a web page without root, why can I not do that with a web server of my own? But how to do it. Alhough I do have an Apache web server set up, what about the times when it may not be available. Aha! The quickie web server (see links below) can be the answer. So I copied the files where I wanted to serve the files to the Nexus 7. then made sur...

The new file cabinet.

Image
The new file cabinet or what is called network-attached storage (aka nas) is very useful for a business. Network-attached storage is a computer(s) that are dedicated to acting like an external hard drive for your computer network. Not that you could not share files from your local machine, the nas allows more than one person access under certain rules load and save files to the unit. It is basically a computer dedicated to serving out files. Just a new name or buzz word for a traditional file server. Nas units are generally oriented to the home or small business where management or administration of the file server is or can be reduced. You can get a nas in what is called a turnkey package off the shelf from your local electronics store. Generally you might pay a premium for such a setup. But then you know it should be supported well from the manufacturer. Hewlett Packard is a prime example of those units. Now everyone under the sun is selling some sort of system billing themselves a...