Caffeine, silicon and nimesulide

{ 'fullname' : "Michele Zonca", 'tags' : ['developer', 'mashaper', 'caffeinated', 'nerd']}

My blog’s theme customizations

I wanted to change my dark theme, so a week ago, I started with the minimalistic theme and edited it in my spare time:

  • I wanted it wider, so I set body width to 700px from 500px
  • removed cufon to google web fonts (now using Josefin Sans)
  • I often use tags to better give a context to my posts, so I added the tags visualization
  • changed color for posts metadata and borders from #BCA474 to #85B5A5
  • I removed some borders in header
  • aligned all images and videos to the center of the page (they are still 500px wide)
  • moved the search form below site description
  • titles to the left
  • added support to linkedin profile’s url

Next steps? To let users set some variables to customize it in a simple and immediate way (if you use tumblr you know what I mean) and then submit it to tumblr

  • clean up css
  • set #85B5A5 as a customizable field text
  • set also the google font name as a textbox in the admin panel, to change font in seconds
  • support other social networks in the menu

On 1 June 2011, Oracle Corporation submitted the OpenOffice.org code base to The Apache Software Foundation. That submission was accepted, and the project is now being developed as a podling in the Apache Incubator under the ASF’s meritocratic process informally dubbed “The Apache Way”.

OpenOffice.org is now officially part of the Apache family.

The project is known as Apache OpenOffice.org (incubating)

forcing text files to UTF-8 charset

first of all I use file utility to get the file charset, with -b and -i parameters to have a brief report, in mime type style:

michele@erakis:~$ file -bi file.txt
text/html; charset=unknown-8bit
michele@erakis:~$ vi file.txt

then in vi

:set encoding=utf-8
:set fileencoding=utf-8
:wq

let’s check

michele@erakis:~$ file -bi file.txt
text/html; charset=utf-8

AWS IAM Policy: give access to one bucket

Today I had to create a new user in our S3 account and to give him all permissions to just one bucket.

As you can see in our S3 file-manager implementation ( https://github.com/Mashape/file-manager ) I use these two lines to load credentials from a properties file and to connect to the S3 bucket

s3Service = new RestS3Service(awsCredentials);
bucket = s3Service.getBucket(properties.getProperty("s3.bucket"));

The second lines throws an exception if you don’t give s3:ListAllMyBuckets permission to that user. So the final policy I used is this:

{
  "Statement": [
    {
      "Action": [
        "s3:ListAllMyBuckets"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    },
    {
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::bucket",
        "arn:aws:s3:::bucket/*"
      ]
    }
  ]
}

Obviously you can avoid the “Action”: “s3:*” part and put just a list of actions you want to allow..