On linux computers the users all live within /etc/passwd
To really quickly see what users we have set up we’ll use the CAT command.
So, SSH to your server in the usual was then run this command
cat /etc/passwd
And that’t that.
Posted in Command Line Linux
Tagged with Command Line Linux
The CAT command on Linux can be used for a few different uses, such as displaying a text file on screen, copying files, creating files and merging files.
For the moment I’m just going to look at displaying files.
Imagining we have a file called file.txt, to view this on the screen we would enter the command
cat file.txt
Obviously this relies on the file being in the current folder. You could just enter the whole path in the command prompt such as.
cat /folder/subfolder/file.txt
And that’s that. I’ll look at the other uses later.
Posted in Command Line Linux
Tagged with Command Line Linux
Sometimes you need to check that an element exists in your page before you target it with jQuery.
Here is a dead simple way I found. It may not be the best, if you have a better way hit me up in the comments.
if(('#element').length > 0){
// Put your cool code here
}
Posted in Javascript JQuery
Tagged with Javascript JQuery
The other day I came across a strange thing, or at least I thought it was a strange thing.
Whilst writing a small application that would migrate user accounts from one database to another, I encountered one user who could log in quite happily without entering a password at all. Read More >
Posted in Functions PHP
Tagged with MD5 PHP
One of the things that can effect performance on your Mac is the Dashboard.
The dashboard sits in the background and has a whole host of small widgets which it must keep stored in RAM.
Pop open the dashboard and check out what widgets you have running. One thing you can do is to delete the widgets that you no longer use.
Alternatively if like me you don’t use the dashboard at all you can just switch it off.
To kill the dashboard open the terminal and enter
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
Don’t worry this isn’t permanent, you can get the dashboard back at any time by doing this.
defaults write com.apple.dashboard mcx-disabled -boolean NO
killall Dock
But in order for any of these changes to take effect, you must restart the Dock by typing:
killall Dock
Posted in Apple OSX
Tagged with OSX