Odynia.org blog
  • Home
  • Apple / Mac / iOS
    • iOS
    • iTransit
  • General
    • Dukan Diet
  • Web Development
    • Microsoft CRM
    • Xnyo
    • PHP
  • Unix / BSD
    • Server Build

OmniGraffle Stencil for Amazon Web Services (AWS)

Oct17th
2012
avatar Written by Rob

So I got annoyed at the available AWS Stencils on Graffletopia. Like many other stencils they end up being an image embedded inside a shape. For the most part this is OK: the shapes scale reasonably nicely. There is some occasional stretching if you want to try a different aspect ratio, but it works.

The problem comes when you try to snap objects to it with magnets or edit the shapes in any way. You realise its just a square box with an image inside. You can’t remove elements, change colours or manipulate it in any way.

Additionally, the existing set didn’t have any labels so you would need to check regularly as to what they all were.

So I set out to see if I couldn’t create better shapes from the Amazon’s original vector icons.

My results are linked at the bottom and are going up on Graffletopia shortly.

To make this I used the following process:

  1. Download and unzip the EPS/SVG package available here.
  2. Using Terminal, change to the downloaded directory, and then to the subdirectory eps_v1.4.
  3. Convert the EPS files to PDF using pstopdf:
    Shell
    1
    2
    $ mkdir pdf
    $ for i in *.eps; do pstopdf "$i" -o "pdf/$i.pdf"; done
  4. The PDF files will now be available in the pdf subdirectory.
  5. In OmniGraffle, touch the cog at the top of the Stencil window and select New Stencil.
  6. Now, if you drag the converted PDF files to the OmniGraffle icon in your dock it will create a new graffle document (called Untitled) with the PDF contents converted to shapes.
  7. Don’t just drag the pdf files directly into your graffle documents, this will just add the PDF’s preview image (a PNG) to your document.

Note: I did try the Visio stencils first thinking that might be easier but OmniGraffle Pro 5.4.2 (v139.16) did not like them at all.

Anyway, the resulting stencils are available here. To use, extract the zip file and drag the AWS folder into Library/Application Support/The Omni Group/OmniGraffle/Stencils/.

-Rob

Apple / Mac / iOS    aws, omnigraffle

jubeat plus / jukebeat: An iOS Game Review

Oct17th
2012
avatar Written by Rob

Photo: Stéfan

Let’s get it out-of-the-way up front: I like arcades. So much so that I spent a good chunk of time in my not-so-recent (May 2012) trip to Japan in their arcades (Taito Stations, Game Stations, etc) throwing 100円 coins in pachinko, slots and UFO machines (or skill testers as they are more commonly referred to here). There is a huge variety of video games available in a Japanese arcade that you could easily blow your large chunks of your travel budget there, unlike the typical fare in the Australian equivalents.

But I digress; while there are many posts that could be written on the Japanese arcade, this one is about my favourite of them: Konami’s Jubeat machines (the Engrish on that site is great).

While I initially avoided them due to lack of familiarity I did eventually give them a go in Kyoto at an arcade on Kawaramachi-dori. And I was hooked, first go. It’s a simple concept, like Guitar Hero and its cohorts: tap the squares in time with the music.

Unlike Guitar Hero et al, Jubeat’s main screen is actually inside the squares themselves. A 4×4 grid of plastic squares contain the displays that prompt your interaction; the squares light up in sequence and you hit them at the appropriate time, in harmony with the music, to score points.

Anyway, while attempting to find an iOS game that might replicate the functionality of the original game I discovered that KONAMI had released the original game to the app store as jukebeat (Australian/US Store) or jubeat plus (Japanese iTunes Store link). Imagine my surprise! An opportunity to throw hours at the game that capitivated me in Japan without the need to feed the machine 100円 coins.

jubeat copious. Source: Wikimedia Commons

I installed the original Japanese version of the game (as that is the one I fell for, after all; but a Japanese iTunes account is required) but a few minutes with the jukebeat game from the Australian stores suggests they are the same, aside from the available music. The game itself is free. Konami charges for additional music tracks available via in-app purchase, should you wish to progress beyond the three bundled songs.

Each track has three levels available: a Basic level for beginner and intermediate players, an Advanced level, and an Extreme level for those who consider themselves insane. Naturally the levels are arranged in order of difficultly from 1-10, with your typical Basic level running 1-5, Advanced 5-8 and Extreme 7-10.

Playing the game by yourself can be quite amusing, hit the Single button to start a song on your own and attempt to beat your own score. Your performance is ranked a Failure (D and below), or Clear (C, B, A, S, SS and SSS). Hitting every square at the right time during the song will net you a Full Combo.

The difficulty curve is quite decent, though some games of the same level vary in difficulty; presumably that comes down to your playing style. It is pretty simple to learn to play though, and quite hard to master.

The music choice is varied. Interestingly, a decent chunk of the Japanese music is available via in-app purchase in the Australian/US version but not vice-versa. The majority of the music available is stuff that KONAMI has created themselves – either as originals for the game (KONAMI or copious packs) or from other games they have created. There’s a few packs in there from pop/rock/oldies though so it mixes it up reasonably well.

Additionally, you can host and join games (much like the original jubeat machines which are networked) over the local network and bluetooth (I was unable to find anyone willing to subject themselves to humiliating defeat in a match against me); just pick your song and host a game. Likewise Game Centre is built in, its depressing looking at the leader boards though.

But the proof is in the pudding: I’ve spent about ~40 hours playing since I rediscovered it a few weeks back. It is rather addictive; the innocent thought “one more go” common among the pounding of the iOS device screen. Speaking of, I’ve found it easier to play on my iPad than my iPhone (Giraffe Phone or otherwise) as you can use full hands and many fingers to play. My iPad has so far survived several dozen drummings without being worse for wear; but gentle players need not hammer the screen at all, just press carefully.

My advice: give it a go. It’s great fun and can be quite addictive. And if you’re after a challenge on a real jubeat machine, the old Hollywood Karaoke building on Bourke St in the Melbourne CBD (next to Hungry Jacks) has an arcade with two Jubeat machines. Be ready to take a pocket of shiny gold coins though: $1 will buy you four songs.

-Rob

 

PS. For fun, here’s someone attempting one of the bundled songs (Japanese version) on Extreme:

App Review    iOS, iPad, iPhone, japan, jubeat

Installing Apache and Its Ecosystem: Part 2

Jul13th
2012
avatar Written by Rob

Back here in Apache Land it is time to continue with the install. In this post I’ll be installing PHP. Part 3 will cover Subversion, and Part 4 I’ll be running through my standard configuration and website setup.

Installing PHP 5.4.4

At the time of writing PHP 5.4.4 is the current stable release of PHP, so we’ll be installing that and a dozen or so modules. I used to be a PHP developer in a past life (or so it feels, sometimes) so there are a lot of modules I used to make regular use of.

Additionally, I run a lot of the usual software like WordPress, Roundcube,  Gallery2, WebSVN, etc.

A quick look at the modules installed on Tyrande (the existing server):

Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[root@tyrande /]$ php -m
# [PHP Modules]
# bz2
# Core
# ctype
# curl
# date
# dom
# ereg
# fileinfo
# filter
# gd
# gettext
# hash
# iconv
# imap
# json
# ldap
# libxml
# mbstring
# mcrypt
# mhash
# mysql
# mysqli
# openssl
# pcre
# PDO
# pdo_mysql
# pdo_pgsql
# pdo_sqlite
# pgsql
# posix
# Reflection
# session
# SimpleXML
# snmp
# soap
# sockets
# SPL
# SQLite
# ssh2
# standard
# tidy
# tokenizer
# xml
# xmlreader
# xmlwriter
# zip
# zlib
#
# [Zend Modules]
[root@tyrande /]$

Read on for full installation instructions..
READ MORE »

Server Build    apache, freebsd, php, ports, server build, shana

Installing Apache and its Ecosystem: Part 1

Jul10th
2012
avatar Written by Rob

I guess it is time for the big boy. Apache can be one of the most complicated things you install, mostly for the additional languages and modules. Like many, I have my own way of configuring it.

I’ll lay this out up front: I don’t like the FreeBSD layout for Apache. Everything is scattered throughout /usr/local and buried deep in the system. I got used to using the OpenBSD layout during my stint with that OS, and so I continue to use that on FreeBSD. It puts everything in /var/www/ and keeps it nice and clean together.

That said, the binaries and other bits and pieces should remain in /usr/local/.

Building from Scratch

For once we’re not going to install Apache from ports. Why? Because it’s too damn hard to adjust the layout without building a completely custom port. What we can do though is use the ports tree to do a big chunk of the work for us.

Configure your options

Run make config in the port and select the options you want installed. I go with the defaults here usually.

Shell
1
2
[root@shana /]$ cd /usr/ports/www/apache22
[root@shana /usr/ports/www/apache22]$ make config

Install the dependencies

Now that we’ve selected our options, we can also use it to build and install the dependencies, much the same as we would do if we were installing Apache through ports.

Shell
1
2
3
4
5
6
7
8
9
10
11
[root@shana /usr/ports/www/apache22]$ make depends
# ===>   apache-2.2.22_5 depends on file: /usr/local/bin/perl5.12.4 - found
# ===>   apache-2.2.22_5 depends on file: /usr/local/bin/perl5.12.4 - found
# ===>   apache-2.2.22_5 depends on shared library: expat - found
# ===>   apache-2.2.22_5 depends on shared library: apr-1 - found
# ===>   apache-2.2.22_5 depends on shared library: pcre - found
# ===>   apache-2.2.22_5 depends on shared library: iconv.3 - found
# ===>   apache-2.2.22_5 depends on file: /usr/local/bin/perl5.12.4 - found
# ===>   apache-2.2.22_5 depends on file: /usr/local/bin/autoconf-2.69 - found
# ===>   apache-2.2.22_5 depends on package: libtool>=2.4 - found
# ===>   apache-2.2.22_5 depends on file: /usr/local/bin/perl5.12.4 - found

So that is everything we should need.

Generating the configure command

Now we let the port install get as far as configuring the build, that will generate the configure command that was used, and we can copy that command and use it to build our own setup.

Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[root@shana /usr/ports/www/apache22]$ make configure
#
#  To enable a module category: WITH_<CATEGORY>_MODULES
#  To disable a module category: WITHOUT_<CATEGORY>_MODULES
#
#  Per default categories are:
#   AUTH AUTHN AUTHZ DAV CACHE MISC
#  Categories available:
#   AUTH AUTHN AUTHZ CACHE DAV EXPERIMENTAL LDAP  MISC PROXY SSL SUEXEC THREADS
#
#   To see all available knobs, type make show-options
#   To see all modules in different categories, type make show-categories
#   You can check your modules configuration by using make show-modules
#
# ===>  Found saved configuration for apache-2.2.22_5
# ===>  Extracting for apache-2.2.22_5
# <snip>
# config.status: creating include/ap_config_auto.h
# config.status: executing default commands

Setting up our own build environment

Now we’ve had our fun with ports it is time to build our own copy of Apache. I do my compilation in a directory called /archive/compile, but you can do it anywhere you like.
READ MORE »

Server Build    apache, freebsd, http, ports, server build, shana

Firewalling: The OpenBSD Packet Filter

Jul10th
2012
avatar Written by Rob

It is time to get security conscious! Installing and using pf for your firewall is a breeze, so this post will mostly be describing my firewall configuration and some of the awesome things you can do.

Warning: This is another long one.

I use the OpenBSD Packet Filter, or pf, for my server-level firewall. Why? Based originally on ipf, I find it to be much simpler and more powerful than the usual tools like iptables. How powerful? One line will normalise all incoming traffic. Normalisation is the process of cleaning up bad or invalid packets that can wreak havoc in poorly written server software.

It has the usual port filtering and Network Address Translation (NAT) features, plus traffic redirection (port forwarding),  Operating System-based filtering, packet queuing, prioritisation, address pools, and load balancing. Yep, when paired with CARP (the Common Address Redundancy Protocol), pf can bring you the same level of redundancy and load balancing as enterprise level Cisco gear. I had a series of four servers setup in an old workplace, each was redundant for the other using CARP + pf. You could even control the order of failover across all four servers.

Anyway, pf is installed by default, we just need to setup our rules and enable it. The first thing you need to know though, is don’t turn it on with untested rules. If you do you’re more than likely to lock yourself out of the server, at which point you’d better hope your console access is working.

Before we dive into my configuration, an overview of the configuration file is probably in order. A pf.conf file is generally broken into several sections.

Macros Variables that you can set to be re-used later on.
Tables Variables that can hold a list of data, like a list of IP Addresses
Options Options that control how pf functions.
Queuing Rules and options to support queuing and prioritisation
Filter Rules The bulk of your firewall ruleset, providing port filtering, NAT and traffic redirection.

Now, while my general configuration has a few interesting things you can do with pf, it is actually rather boring compared to some setups I’ve done in the past. I don’t use traffic redirection, queuing, prioritisation or load balancing. It’s just a server firewall.

The most useful resource you will find for pf is the OpenBSD FAQ page on the topic.

Read on for my configuration and the step by step instructions to set it up.
READ MORE »

Server Build    dns, firewall, freebsd, http, imap, mail, pf, pop3, server build, shana, smtp, ssh
← Older Entries
Avatars by Sterling Adventures

EvoLve theme by Theme4Press  •  Powered by WordPress Odynia.org blog
I write about things.