The first thing I say to anyone trying to better their understanding of photography is to first stop and consider what it is they are actually doing.

Photography = from the greek photos (light) and graphos (writing or painting).

Photography is the process of painting with light.

Whether you have a lot of light, or barely any at all; will dictate entirely the kinds of images you can produce. Understanding the light in your environment and how light works inside the camera is paramount to being able to select the right mode/settings and achieve the kind of shot you want.

Read the rest of this entry »

While CentOS’ default repository comes with heaps of useful services, there is more value to be added by adding the Extra Packages for Enterprise Linux repository as well.

Adding the repository is easy…

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

A list of the EPEL (x86_64) packages can be found here, but some of the more popular ones you might be interested in, include…

  • phpMyAdmin
  • shellinabox
  • nginx
  • zabbix
  • ettercap
  • apcupsd

Installing phpMyAdmin

Install the package

yum -y phpMyAdmin

Edit the phpMyAdmin configuration file to allow access to the interface.

vi /etc/httpd/conf.d/phpMyAdmin.conf

Find the existing Require and Allow criteria and substitute your own management IP Address. Conversely if you want to allow access from anywhere (probably not a good idea, but hey – it’s your server) you can substitute these rules instead.

Require all granted
Allow from all

..finally don’t forget to restart the webserver.

service httpd restart

 

With malware systems scanning for server vulnerabilities all the time (like Windigo), it’s important to secure your server wherever possible. Especially at the shell level and double if you have SSH facing the internet.

Check the security guide at CentOS’s website…

http://wiki.centos.org/HowTos/Network/SecuringSSH

More How-To’s can be found here…

http://wiki.centos.org/HowTos

Following up on my CentOS 6.5 WebServer tutorial, here’s how you can get a Multisite WordPress installation up and running muay pronto!

Read the rest of this entry »

Here’s a brief (?) rundown for setting up a CentOS 6.5 web server from scratch, using Linux Apache, MySQL and PHP (a.k.a LAMP).

Firstly, fetch the latest CentOS-6.5-x86_64-bin-DVD1.iso from one of their mirrors.
http://isoredirect.centos.org/centos/6/isos/x86_64/

Boot the ISO and follow the prompts to install CentOS. Most defaults should get you going. You can configure the network settings and operating system features (packages) from within the installer, but for the most part the general defaults should get you to where you need to be. This tutorial will cover off everything you need, even for a “Basic Server” install.

Read the rest of this entry »

Screen capture an OS X machine and send the images to a web server.

Using the inbuilt screencapture command, quietly capture the screen and cursor (up to three displays) and save them in a temporary folder, named with the current date and time.

Note the postfixes (e.g. _s1) on the filenames to indicate different monitors.

screencapture -x -C -tjpg /var/tmp/sc_$(date +%Y%m%d-%H%M%S)_s1.jpg /var/tmp/sc_$(date +%Y%m%d-%H%M%S)_s2.jpg /var/tmp/sc_$(date +%Y%m%d-%H%M%S)_s3.jpg

For storage and archive purposes; move them into a zip file named for the current date.

zip -m /var/tmp/sc_$(date +%Y%m%d).zip /var/tmp/sc_*.jpg

Alternatively, we can send the file to a web server. Either by PUT or POST methods, the latter being potentially more secure and then parsable by some form of cgi script.

PUT Method

curl --upload-file sc_$(date +%Y%m%d).zip http://your.web.server/upload/sc_$(date +%Y%m%d).zip

POST Method (var ‘upload’)

curl -F upload=@sc_$(date +%Y%m%d).zip http://your.web.server/upload/sc_$(date +%Y%m%d).zip

doge screens, much sneaky, so capture, wow!

Enable Secure Shell access to OS X via the command line (sudo required)

(Thanks to Chealion, Randy Fay and user633466 at superuser.com)

Permissions are controlled via Directory Services. If the record name below is ‘-disabled’ that means ALL USERS have access to SSH. To limit access to specific users, first we rename the record.

dscl . change /Groups/com.apple.access_ssh-disabled RecordName com.apple.access_ssh-disabled com.apple.access_ssh

Then add a user to that record. (Where USERNAME is the shortname of the user to add)

dscl . append /Groups/com.apple.access_ssh GroupMembership USERNAME

dscl . append /Groups/com.apple.access_ssh groupmembers `dscl . read /Users/USERNAME GeneratedUID | cut -d " " -f 2`

Finally, enable the service.

systemsetup -setremotelogin on

..and you should be good to go. :)

Want to free up those megabytes used by Dashboard (that you never use…) disable it!

Drop to terminal and type…

defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock

Done!

Alternatively if you’d rather have your widgets on the desktop and not have to drop to the Dashboard all the time, follow these steps outlined at OSX Daily…

http://osxdaily.com/2013/01/18/add-dashboard-widgets-desktop-mac-os-x/

“If I have seen a little further it is by standing on the shoulders of Giants.” – Isaac Newton

Great are those that strive to reach taller heights, except most just sit and enjoy the view or slide down the spine and get stuck in the arse crack.

Had a bit of fun with Applescript today making stand-alone applications out of script bundles to play audio files.

[Grab the apps here]

And here’s the script (for one of them)…

set audio_file to (path to current application as string) & "Contents:Resources:SqueakyToy.mp3"
do shell script "afplay " & (quoted form of POSIX path of audio_file)

To create the bundle in the first place, start a new applescript and save it as a script bundle, then add the audio file to the resources pane and ensure the colon:delimited:path is reflected correctly in the script.

Because the script references the “current application” it won’t run out of the Apple Script Editor but it should compile okay and run once saved as an Application.

:)

Have fun.

Follow

Get every new post delivered to your Inbox.