Tag Archives: name

recent searches: HI I found a ipod can I register under new name?

18 Jul

so i logged into mint to find this as a recent incoming search : HI I found a ipod can I register under new name?

lol. i gotta good laugh from it so here’s a quick answer.

I’m going to assume the person really wanted to know how to change the device name etc.

wipe the ipod completely

how to: boot a vmware machine via command line

19 Dec

I’m using vmware 6, so I don’t know if this works in 5 or server editions.

vmware installs a script called vmrun that allows you to perform almost anything you need to do on a vmware machine pragmatically.

sidney@my-host:~> /usr/bin/vmrun
vmrun version 6.0.4 build-93057

Usage: vmrun COMMAND [PARAMETERS]

Authentication flags
-gu
-gp

POWER COMMANDS           PARAMETERS           DESCRIPTION
start                    Path to vmx file     Start a VM or Team
                         or vmtm file
                         [gui|nogui]
stop                     Path to vmx file     Stop a VM or Team
                         or vmtm file
                         [hard|soft]
reset                    Path to vmx file     Reset a VM or Team
                         or vmtm file
                         [hard|soft]
suspend                  Path to vmx file     Suspend a VM or Team
                         or vmtm file
                         [hard|soft]

SNAPSHOT COMMANDS        PARAMETERS           DESCRIPTION
listSnapshots            Path to vmx file     List all snapshots in a VM
snapshot                 Path to vmx file     Create a snapshot of a VM
                         Snapshot name
deleteSnapshot           Path to vmx file     Remove a snapshot from a VM
                         Snapshot name
revertToSnapshot         Path to vmx file     Set VM state to a snapshot
                         Snapshot name

GUEST OS COMMANDS        PARAMETERS           DESCRIPTION
runProgramInGuest        Path to vmx file     Run a program in Guest OS
                         Program
                         [Program arguments]
fileExistsInGuest        Path to vmx file     Check if a file exists in Guest OS
                         Path to file in guest
setSharedFolderState     Path to vmx file     Modify a Host-Guest shared folder
                         Share name
                         New host path
addSharedFolder          Path to vmx file     Add a Host-Guest shared folder
                         Share name
                         Host path
removeSharedFolder       Path to vmx file     Remove a Host-Guest shared folder
                         Share name
listProcessesInGuest     Path to vmx file     List running processes in Guest OS
killProcessInGuest       Path to vmx file     Kill a process in Guest OS
                         process id
runScriptInGuest         Path to vmx file     Run a script in Guest OS
                         Interpreter path
                         script_text
deleteFileInGuest        Path to vmx file     Delete a file in Guest OS
                         File
createDirectoryInGuest   Path to vmx file     Create a directory in Guest OS
                         Directory path
deleteDirectoryInGuest   Path to vmx file     Delete a directory in Guest OS
                         Directory path
listDirectoryInGuest     Path to vmx file     List a directory in Guest OS
                         Directory path
copyFileFromHostToGuest  Path to vmx file     Copy a file from host OS to guest OS
                         Path on host
                         Path in guest
copyFileFromGuestToHost  Path to vmx file     Copy a file from guest OS to host OS
                         Path in guest
                         Path on host
renameFileInGuest        Path to vmx file     Rename a file in Guest OS
                         Original name
                         New name

GENERAL COMMANDS         PARAMETERS           DESCRIPTION
list                                          List all running VMs
upgradevm                Path to vmx file     Upgrade VM file format, virtual hw
installtools             Path to vmx file     Install Tools in Guest OS

Examples:
  vmrun list
  vmrun upgradevm w2k.vmx
  vmrun reset w2k.vmx soft
 

Yippie!

Today I turned 27…

5 Dec

Today I turned 27, weird. It’s been a crazy 6 weeks: resignations, relocations. In the end it all feels right…

Welcome to miami, hello 27, let’s rock…

hi my name is sid. destroyer of stuff, break of things / geek, sometime ninja :)

customer service made easy and start up friendly

3 Dec

Came across this today:
http://getsatisfaction.com/

They let you setup an area for users / customers to prove feedback, bugs, questions, etc and you can respond directly to them. Yes track has a bug tracker, but this is just to easy. You can also ask your users for their feedback as well. To top it off they already have more than a few big names using the service.

Get Satisfaction – People-Powered Customer Service

Building Something Scalable: Caching

5 Oct

I’ve been seriously getting my kicks with scalability fora number of months, so why not start on ongoing series where I talk about what I’ve learned / found?

So welcome to to the first: Building Something Scalable – An ongoing experiment. This post covers caching. I’ll cover delivery in the next post.

Keep in mind language wise I’m using php, but the general advice should be sound, regardless of language. If you disagree with something or have a better way, feel free to comment.

So now that I’ve ranted off 4 topics, maybe I should expand on them a bit.

Use Caching

Caching is a good thing, but use caching is a pretty vague statement, so let’s expand.

Caching isn’t just a one ring to rule them all type of solution. Its actually a fixture of a number of different solutions, that work together to boost your site / applications overall performance.

Database caching

I consider database caching a 2 part solution. You have the mysql query cache, but I also like to have a server side query cache as well. Why? I tend to use oop and having a server side query cache allows me to cut some overhead both appilcation wise, and by preventing me from having to connect / query mysql.

The big issue with server side query caches is stale queries. The mysql query cache prevents stale caches automaticly, but with a server side query cache we’ll need to set a TTL (time to live). I tend to go with something really low like 5-10 seconds.

5-10 seconds may seem pointless, but it allows higher traffic applications to handle a number of requests with fewer queries to mysql. This takes some of the load from mysql, so  your database is performing under less load than it would have without the server side query cache.

There is plenty of information on the mysql query cache online, so fire up google and start researching. For your server side cache here a few things to keep in mind

  1. keep your cache in a secure location. If your using a file cache this means outside of your web directory
  2. hashing is a quick and painless way to uniquely id your queries. md5(’select * from table1′) will allows return md5(’select * from table1′) if done correctly.
  3. prevent cache filename collisons.
  4. do a light weight encoding on cache files. base64_encode / base64_decode are quick and easy to use. They’re not secure, but its a good idea to add some basic obfuscation
  5. keep your TTL low. Your query cache should try to stay as fresh as possible.

Opcode Cache

Php is compiled / ran at runtime (when you request a page / script). Opcode caches store the compiled code so that your code doesn’t have to be compiled for every request. Opcode caches can increase your codes performence by up to 90%, but then again, any increase helps the overall perforence of your site / application.

There are a number of opcode caches avaible for php. I prefer xcache, but there are a number of other opcode caches available for php.

Static content cache

Static content unlike dynamic content is, well static. Your probably wondering: Why cache something thats already static? Simple, performence. Static content though is cached / served differently than dynamic content. I know this touching more on delivery, but its still worth mentioning.

Static content is often served through a CDN (content delivery network) or a web cache. A CDN and web cache act similarly, except that a cdn has a number of servers setup in various locations.

Content Delivery Network
A CDN acts just as it’s name says: It delivers your content via its network of servers. The CDN selects a server closest to the location of the user, and serves your content from that location. Whats the benifit? Faster delivery of your content. Is it worth it? That’s a question only you can answer. Do some research, compare the solutions, check you budget – and you’ll have your answer.

Web Cache
A web cache or reverse proxy simply put delivers your content faster. I’m not to well versed in the science of it all, but here’s a basic break down of what I do know:

Web caching software like vanish (in the past squid was the standard) handle servering static content better than apache, and with a smaller footprint. The web cache creates a cache of your content when requested and then delivers your content from its memory / disk cache.

The most obvious benefit from all this? Reduced server load. Apache is a resource hog (there I said it), but that will be covered in a future post in this series. By moving static content delivery to software created just for this task your freeing resources and of course getting content to users quicker.

Output Cache
So far we’ve looked at a number of ways to increase the speed of dynamic and static content, but there’s still one major item left out: Output Caching.

As your scripts / application generates pages, you can cache them to be served for future requests. Output caches in general can be as basic or complex as you need them. A few things to keep in mind.

  1. stale content, your cache should have aTTL(time to live) that prevents it from serving stale content
  2. filename collisons – your naming scheme should prevent filename collisons
  3. store your cache outside of your web folder
  4. logged in users / vs non logged in users – come up with a solution that deals with this.

Variable / Object Caches

Your code has objects and variables, often some of these objects are database intensive. An object / Variable cache is a way to store your objects and variables. The thing to keep in mind with these types of caches is speed.

It makes no sense to cache something like $var=1+1;. You can run that command quicker than you would access it from the cache. A good example of somethign to cache would a class object that runs a number of queries on the database, but accesses content that doesn’t change as often. By caching this object you can prevent a few database queries (or cache calls). Or a class object that generates a number of child class objects.

I could go on and on about this subject but lets get to the point. If your application is running on only one server use a file cache. If your application uses more than once server look into memcached / memcachedb.

Thats it.
Hopefully that was short and sweet, the next post will cover delivery.

Greg – Out

Dns: Enabling / securing Zone Transfers

23 Sep

Open and edit : /etc/named.conf

change:

zone “domain.net” {
    type master;
    file “domain.net”;
    };

zone “domain.net” {
    type master;
    file “domain.net”;
    allow-transfer {
        192.168.1.1;
        common-allow-transfer;
    };
};

Replace 192.168.1.1 with the ip to allow transfers from

Large Hadron Rap

21 Sep

Large Hadron Rap

framework: need a name

21 Sep

So all frameworks have names… I need one for mine.

I’m debating on the following:

  1. bacon – yes already used once
  2. kali – after the art i study
  3. reeses – after reeses pieces / my daughters nick name

So there ya have it

microsoft: our os sucks so badly we need to trick people into thinking its cool

6 Sep

I’m watching tv, only to see a commercial where windows is market testing a new os. “Holy crap” , I thought to myself, “they realized zista is shite and are already releasing a new os, thats gonna piss off some people”, but a smart move since as mentioned, vista is shite.

Then again, I’d never heard of the code name they used. Well guess waht it was vista.

So I’ve decided due to my all nighter, lack of sleep, and for everyones amusement, to tell you how my demo would have went.

I’m running a core2duo 2ghz with 4gigs of ram. I dual boot into vista 64 from time to time because, well actually i have not sane reason: I just do.


Loading vista: hmm looks kinda sweet
login screen: nice look
login: is this slower than xp?
system startup: crap this is slow

-I should note I only have firefox, antivirus, vmware, a firwall, pidgin, and the adobe web / creative suite installed. This is an install thats at best 2 months old, and rarely used.

start firefox: system hangs, kill firefox
start firefox: system hangs, wait 10 minutes

start vmware centos image: system degrades to p4 (pre ht) running xp, and under heavy load
check load : cpu 100%, ram 60%,

say crap why did I load into vista

reboot

opensuse 11 loads

I start up an xp vmachine with 313mb of ram, centos5 vmachine with 256 of ram, firefox, evolution, utorrent, gimp, pidgin, exalie, and a bunch of folders (forgot to mention opening my downloads folder almost crashes vista) including my downloads folder. Oh yeah I should mention I normally have 10-30 tabs open in firefox3.

open flash cs3, dreamweaver cs3, and virtual folders in xp

check my stats: cpu1 26%, cpu2 31%, ram 41%, swap 0%, upload 84k.

wonder why an xp machine thats barely using my cpu, and that has almost no ram out performs vista…..

and now to code, and eventually find sleep

regex for extracting root domain

15 Aug

I don’t remember if i’ve already posted this.

Sometimes you need to extract a domain name from a url. The following regex will do just that regardless of subdomains, etc.

/^[a-z0-9.-]*?[.]{0,1}([a-z0-9-]*?\.[a-z.]{2,7})$/i