Neil Hillman

Your website is your image, and you want to look good.

Demotivational: Internet Explorer and more…

 

“Motivational Posters” are the kind commonly found in schools and corporate offices, designed to inspire people to achieve more or think differently. Over the years, they have been repeatedly parodied, and “Demotivational Posters” have become an Internet meme, juxtaposing banal optimism with comical pessimism. Here are some of my favourites demotivational posters.

You are the result of 4 billion years of evolutionary success... Now fucking act like it!

You are the result of 4 billion years of evolutionary success… Now fucking act like it!

Internet Explorer ... has encountered a problem and needs to die

Internet Explorer … has encountered a problem and needs to die.

Angry Badger – I don't know what you did, but you've really pissed him off.

Angry Badger – I don’t know what you did, but you’ve really pissed him off.

Bandan... Bananda... Banapple? Oh sod it! Curved Yellow Fruit 40¢

Bandan… Bananda… Banapple? – Oh sod it! Curved Yellow Fruit 40¢

Branches – Sometimes they just appear out of nowhere

Branches – Sometimes they just appear out of nowhere

Cheeseburger Stabbing – Meanwhile, in America...

Cheeseburger Stabbing – Meanwhile, in America…

Deaf People – They just don't listen

Deaf People – They just don’t listen

Diet Water – Because regular water is high in cholesterol, and may increase your risk of obesity, heart disease and stroke

Diet Water – Because regular water is high in cholesterol, and may increase your risk of obesity, heart disease and stroke

Elephants – Larger than the moon

Elephants – Larger than the moon.

Exercise – Welcome to America

Exercise – Welcome to America

Fatherhood – Now if you kill the hooker, you can get your money back!

Fatherhood – “Now if you kill the hooker, you can get your money back!”

Free Wi-Fi – That'll be one McDollar.

Free Wi-Fi – That’ll be one McDollar.

Hello Kitty Assault Rifle – Look cute, kill terrorists.

Hello Kitty Assault Rifle – Look cute, kill terrorists.

Filed under Demotivational Posters, Humour.
 

New logo design for ‘Had You Known’

 

My friend Vincent wanted a quick logo for his new site HadYouKnown.com.

The concept for the site is “Had you known then, (could be 20 years, 10 years ago, 5 years), what you know today what would you have done?”. The goal is to have people share their life experiences and the decisions they have made, and how it had shaped their present.

The only requirements for the logo was something that represented past reflection, and had the text “Had You Known” on it. I came up with this…

Tags: ,

Filed under Portfolio, Web Development.
 

David Platt: The face of Poundland!

 

David Platt: The face of Poundland

Coronation Street star Jack P Shepherd who plays David Platt on the show, is lesser known for his other starring role, the face of Poundland, Europe’s biggest single price discount retailer. Last year on average, he opened a new Poundland Store every eight weeks and four days. He also sticks around afterwards “to sign autographs and give away Poundland vouchers”. Classy.

 

Tags: ,

Filed under Celebrities, Gossip, Humour, TV Shows.
 

UNHCR graphic depicting Camp Ashraf

 

Camp New Iraq (formerly Camp Ashraf)

This morning I was tasked, at short notice, by the UN Refugee Agency to create a small graphic to accompany a press release about Camp Ashraf, (now being called “Camp New Iraq“).

With little information to go on, I decided on a simplified map of Iraq, depicting the location of Camp Ashraf, and it’s proximity to Baghdad. I produced this graphic in under an hour, and I was quite pleased with the outcome.

Some background on former Camp Ashraf

Ashraf is a city turned 25-year-old refugee camp, just 40 miles north of Baghdad. It’s residents, Iranian militant opposition group the People’s Mujahedin of Iran (PMOI), were exiled when they fought alongside Iraqis soldiers against Iran’s cleric leaders in the First Persian Gulf War.

Despised in their own country as traitors, and with little sympathy remaining in post-Saddam Iraq, the fate of the residents of Ashraf now hangs in the balance. The risks of violence are high, and come from both sides, with frequent clashes there resulting in loss of lives.

Tags: ,

Filed under Portfolio, Web Development.
 

LEGO Minifigures Series 6 bump codes

 

Most people don’t realise I’m an even bigger geek than I let on. I collect LEGO minfigures, I have literally hundreds of them at home, including all of the “Collectables” series to date.

The Minifigure “Collectables” series come in opaque polybag packets, designed to stop you identifying which Minifigure you’re buying. But each packet has a faint “bump code” along the bottom, which can be used to distinguish the contents.

I have highlighted the Series 6 bumps with a sharpie and photographed them, (partly to help others, and partly to prevent myself buying the same figure twice)! I currently have 9 of the 16 characters, here are the Series 6 bump codes for the Minifigures I’ve got so far:

Lego Minifigures Series 6 Sleepyhead bump codes

Minifigures Series 6 bump codes – Sleepyhead

Sleepyhead minifigure with a Teddy Bear. Feel for the teddy and spiky hair in the packet.
 

Lego Minifigures Series 6 Lady Liberty bump codes

Minifigures Series 6 bump codes – Lady Liberty

Lady Liberty minifigure with a Torch and Book. No discernible bump code, feel for large skirt piece and flexible spiky hat in the packet.
 

Lego Minifigures Series 6 Flamenco Dancer bump codes

Minifigures Series 6 bump codes – Flamenco Dancer

Flamenco Dancer minifigure with a Fan. Feel for large skirt piece and fan in the packet.
 

Lego Minifigures Series 6 Minotaur bump codes

Minifigures Series 6 bump codes – Minotaur

Minotaur minifigure with an Axe. Feel for the large head piece in the packet.
 

Lego Minifigures Series 6 Leprechaun bump codes

Minifigures Series 6 bump codes – Leprechaun

Leprechaun minifigure with a Pot of Gold. Feel for the round pot of gold in the packet.
 

Lego Minifigures Series 6 Skater Girl bump codes

Minifigures Series 6 bump codes – Skater Girl

Skater Girl minifigure with a Skateboard. Feel for the skateboard wheels in the packet.
 

Lego Minifigures Series 6 Intergalactic Girl bump codes

Minifigures Series 6 bump codes – Intergalactic Girl

Intergalactic Girl minifigure with a Ray Gun. Feel for her helmet in the packet.
 

Lego Minifigures Series 6 Butcher bump codes

Minifigures Series 6 bump codes – Butcher

Butcher minifigure with a Steak and Cleaver. Feel for the steak and cleaver pieces in the packet.
 

Lego Minifigures Series 6 Mechanic bump codes

Minifigures Series 6 bump codes – Mechanic

Mechanic minifigure with a Wrench and Toolbox. Feel for the Wrench and Toolbox in the packet.

Tags: ,

Filed under About Me, Miscellaneous.
 

Available pronounceable 5 letter domains: A-D

 

As you are probably aware, there are no longer any 4 letter .com domain names available, and all 8,938 English five letter words have already been registered. So if you want a short, memorable 5 letter domain name, your best bet is probably to start searching among the pronouncable 5 letter non-words.

I have prepared a list here of over 900 available pronounceable 5 letter domain names starting with A, B, C and D, (excluding those containing the undesirable characters such as J,K,Q,U,V,W,X,Y,Z). There are some good names here, like Afigi.com, Begog.com, Bigef.com and Cobof.com, to highlight a few examples.

If you decide to register one, please leave a comment, as these list took me several hours to produce. If I get enough feedback, I will carry on through the alphabet… ;-)

153 available pronounceable 5 letter domains starting with ‘A’

abahi.com   abefa.com   abefe.com   abefo.com   abehe.com   abehi.com
abife.com   abifo.com   abihi.com   abofo.com   abohe.com   aceho.com
acife.com   aciha.com   acihe.com   acihi.com   adehi.com   adogi.com
afafo.com   afahi.com   afane.com   afebi.com   afebo.com   afefo.com
afegi.com   afeha.com   afehe.com   afehi.com   afeho.com   afene.com
afigi.com   afihe.com   afihi.com   afiho.com   afoba.com   afobi.com
afoce.com   afoci.com   afodi.com   afofe.com   afofi.com   afoge.com
afogi.com   afoha.com   afohe.com   afoho.com   afole.com   afose.com
afote.com   agefe.com   agifo.com   agiha.com   agihe.com   agihi.com
agiho.com   agoce.com   agofe.com   agohe.com   agohi.com   ahace.com
ahafi.com   ahahe.com   ahebi.com   ahece.com   aheci.com   ahede.com
ahefe.com   ahefo.com   ahega.com   ahege.com   ahegi.com   ahehi.com
aheno.com   ahesi.com   ahete.com   aheti.com   ahibi.com   ahifa.com
ahife.com   ahifo.com   ahigi.com   ahobi.com	ahoce.com   ahoci.com
ahodi.com   ahofa.com   ahofe.com   ahofi.com   ahofo.com   ahogi.com
ahohe.com   ahohi.com   ahono.com   alafe.com   allfe.com   allih.com
amehe.com   ammab.com   ammaf.com   ammbe.com   ammce.com   ammdo.com
ammfe.com   ammfi.com   ammfo.com   ammid.com   ammif.com   ammla.com
ammli.com   ammlo.com   ammme.com   ammmi.com   ammri.com   ammso.com
ammti.com   ammto.com   anefe.com   anehe.com   anehi.com   anihe.com
anihi.com   anofe.com   anofo.com   anohe.com   arehe.com   arehi.com
areho.com   areri.com   arihi.com   aroci.com   arofi.com   asebe.com
asehe.com   aseho.com   asifo.com   asihe.com   atehi.com   athac.com
athaf.com   athag.com   athef.com   atheg.com   atheh.com   athib.com
athig.com   athih.com   athob.com   athof.com   athoh.com   atihe.com
atihi.com   atoce.com   atofe.com

241 available pronounceable 5 letter domains starting with ‘B’

babef.com   babof.com   baceb.com   baceg.com   baceh.com   bacif.com
bacih.com   bacof.com   badef.com   badeg.com   badof.com   bafaf.com
bafeb.com   bafec.com   bafeg.com   bafeh.com   bafib.com   bafif.com
bafig.com   bafih.com   bafob.com   bafof.com   bafoh.com   bafot.com
bagaf.com   bagef.com   bageg.com   bagib.com   bagif.com   bagih.com
bahaf.com   bahec.com   bahed.com   bahef.com   bahib.com   bahif.com
bahig.com   bahih.com   bahob.com   bahod.com   bahof.com   bahog.com
bahoh.com   baleb.com   balef.com   balob.com   bamaf.com   bameb.com
bameg.com   bamib.com   bamof.com   banih.com   banoh.com   basib.com
bateb.com   batef.com   batof.com   bebaf.com   bebah.com   bebif.com
bebih.com   bebof.com   becec.com   becef.com   beceg.com   becib.com
becif.com   becih.com   becoc.com   bedib.com   bedif.com   bedoh.com
befeb.com   befeg.com   befeh.com   befib.com   befif.com   befih.com
befob.com   befof.com   befoh.com   befot.com   begac.com   begah.com
begeh.com   begib.com   begih.com   begof.com   begog.com   begoh.com
behah.com   beheb.com   behef.com   beheg.com   behif.com   behig.com
behih.com   behog.com   behoh.com   bemaf.com   bemah.com   bemef.com
bemeg.com   bemib.com   bemif.com   bemih.com   bemoh.com   benob.com
benof.com   berab.com   berib.com   berif.com   berih.com   berob.com
beroh.com   besah.com   besif.com   bibaf.com   bibef.com   bibeg.com
bibof.com   bicag.com   bicah.com   bicef.com   biceg.com   biceh.com
bicif.com   bicih.com   bicog.com   bideb.com   bidih.com   bifad.com
bifaf.com   bifah.com   bifec.com   bifef.com   bifeg.com   bifeh.com
bifib.com   bifig.com   bifih.com   bifir.com   bifob.com   bifof.com
bifoh.com   bifom.com   bigef.com   bigih.com   bihaf.com   biheb.com
bihed.com   bihef.com   biheg.com   biheh.com   bihic.com   bihid.com
bihif.com   bihig.com   bihih.com   bihil.com   bihir.com   bihob.com
bihoc.com   bihod.com   bihof.com   bihog.com   bihol.com   bilaf.com
bilef.com   biloh.com   bimeb.com   bimif.com   bimih.com   bimim.com
bimof.com   bimog.com   bimoh.com   bimom.com   binaf.com   binib.com
binif.com   binih.com   binof.com   binoh.com   birif.com   birig.com
birir.com   birob.com   bisif.com   bisih.com   bisob.com   bitih.com
bitob.com   bobeg.com   bobif.com   bobih.com   bodif.com   bofeb.com
bofef.com   bofeg.com   bofib.com   bofif.com   bofig.com   bofih.com
bofoc.com   bofof.com   bofoh.com   bogeb.com   bogef.com   bogeg.com
bogeh.com   bogib.com   bogih.com   bohaf.com   boheb.com   bohed.com
bohib.com   bohid.com   bohif.com   bohih.com   boleb.com   bolib.com
bolif.com   bomaf.com   bomef.com   bomeh.com   bomib.com   bomih.com
bomoc.com   boneg.com   bonih.com   bonof.com   borif.com   borih.com
borof.com   bosaf.com   boseb.com   bosib.com   bosof.com   botef.com
botif.com

261 available pronounceable 5 letter domains starting with ‘C’

cabaf.com   cabeh.com   cabif.com   cabih.com   cabof.com   cacaf.com
caceb.com   caceg.com   cacih.com   cacog.com   cadib.com   cafaf.com
cafih.com   cafof.com   cafoh.com   cagab.com   cagag.com   cagah.com
cageb.com   cagef.com   cagig.com   cagoc.com   cagof.com   cagog.com
cagoh.com   cahaf.com   cahag.com   cahah.com   caheb.com   cahef.com
caheg.com   cahib.com   cahif.com   cahig.com   cahih.com   cahoc.com
cahod.com   cahoh.com   cahol.com   calih.com   camih.com   camog.com
canih.com   canoh.com   casof.com   casoh.com   cateh.com   catih.com
cebab.com   cebah.com   cebef.com   cebib.com   cebif.com   ceboc.com
cebod.com   cebof.com   cebog.com   ceboh.com   cecag.com   ceceb.com
cecog.com   cedeg.com   cedih.com   cedob.com   cefaf.com   cefah.com
cefeb.com   cefef.com   cefeh.com   cefih.com   cefob.com   cefof.com
cefoh.com   cegad.com   cegeg.com   cegeh.com   cegib.com   cegif.com
cegig.com   cegih.com   cegob.com   cegof.com   cegog.com   cegoh.com
cehac.com   cehad.com   cehaf.com   cehah.com   ceheb.com   cehed.com
cehef.com   ceheg.com   cehib.com   cehif.com   cehig.com   cehih.com
cehim.com   cehin.com   cehir.com   cehob.com   cehoc.com   cehod.com
cehog.com   cehoh.com   celih.com   cemeh.com   cemof.com   cemog.com
cemoh.com   ceneh.com   cenif.com   cenih.com   cenoh.com   cerab.com
cereh.com   ceroh.com   ceseg.com   cesih.com   cesob.com   cesot.com
cetah.com   cetob.com   cetog.com   cetoh.com   cibab.com   cibeb.com
cibib.com   cibif.com   ciboc.com   cibof.com   cibog.com   cibom.com
ciceb.com   ciceh.com   cideh.com   cidid.com   cidih.com   cidod.com
cidof.com   cidoh.com   cifag.com   cifeb.com   cifef.com   cifeh.com
cifet.com   cifib.com   cifim.com   cifof.com   cifog.com   cifoh.com
cigab.com   cigag.com   cigeb.com   ciged.com   cigeh.com   cigib.com
cigid.com   cigif.com   cigig.com   cigih.com   cigim.com   cigob.com
cigof.com   cigog.com   cigoh.com   cigom.com   cihab.com   cihag.com
cihah.com   ciham.com   ciheb.com   cihec.com   cihed.com   ciheg.com
ciheh.com   cihib.com   cihid.com   cihif.com   cihig.com   cihih.com
cihim.com   cihin.com   cihit.com   cihob.com   cihod.com   cihof.com
cihog.com   cihoh.com   cihol.com   cihom.com   cileh.com   cilig.com
cilll.com   cilob.com   cilod.com   cilof.com   ciloh.com   cimeh.com
cimib.com   cimig.com   cimih.com   cimog.com   cimoh.com   cinib.com
cinih.com   cinob.com   cirif.com   cirof.com   ciseh.com   cisib.com
cisih.com   cisob.com   cisod.com   cisoh.com   cisot.com   ciths.com
cobeb.com   cobef.com   cobif.com   cobih.com   cobof.com   coceh.com
cocih.com   codih.com   codob.com   codof.com   cofef.com   cofeg.com
cofeh.com   cofih.com   cofof.com   cogaf.com   cogag.com   cogeg.com
cogeh.com   cogih.com   cogob.com   cogoh.com   cohaf.com   cohag.com
cohah.com   coheb.com   cohed.com   coheg.com   coheh.com   cohid.com
cohih.com   cohir.com   cohoh.com   colih.com   coneh.com   conih.com
conoh.com   coseb.com   coseh.com   cosih.com   cosoh.com   cotib.com
cotih.com   cotof.com   cotoh.com

253 available pronounceable 5 letter domains starting with ‘D’

dabaf.com   dabem.com   dabif.com   dacag.com   daceb.com   daceg.com
daceh.com   dacib.com   dacif.com   dacir.com   dacof.com   dadeb.com
dadib.com   dadob.com   dadof.com   dafec.com   dafef.com   dafeh.com
dafib.com   dafih.com   dafob.com   dafof.com   dafoh.com   dagac.com
dagaf.com   dagec.com   dagef.com   dageg.com   dageh.com   dagib.com
dagih.com   dagof.com   dahac.com   dahah.com   dahec.com   daheg.com
daheh.com   dahet.com   dahif.com   dahig.com   dahih.com   dahob.com
dahoh.com   dalaf.com   damef.com   damib.com   damig.com   damof.com
danog.com   darib.com   daseh.com   dasih.com   dasob.com   dasoc.com
dasoh.com   dathi.com   datob.com   datof.com   debaf.com   debeh.com
debif.com   debof.com   deceb.com   deceg.com   decif.com   decih.com
dedaf.com   dedib.com   dedif.com   dedih.com   defah.com   defeb.com
defeg.com   defeh.com   defif.com   defob.com   defod.com   defoh.com
degab.com   degad.com   degah.com   degeb.com   degef.com   degib.com
degih.com   degoc.com   degof.com   degoh.com   dehad.com   deheg.com
dehid.com   dehif.com   dehih.com   dehob.com   dehoc.com   dehog.com
dehoh.com   delef.com   deloh.com   demef.com   demeh.com   demif.com
demih.com   denaf.com   desaf.com   deseh.com   desoh.com   deteh.com
detid.com   detof.com   detog.com   detoh.com   dibeb.com   dibif.com
dibig.com   dibih.com   dibof.com   dicef.com   diceg.com   diceh.com
dicig.com   dicih.com   dicof.com   dicoh.com   didaf.com   dideb.com
dideg.com   didib.com   didof.com   difad.com   difeb.com   difef.com
difeg.com   difeh.com   difet.com   difib.com   difif.com   difih.com
difoc.com   difod.com   difof.com   difoh.com   digef.com   digeg.com
dihab.com   dihaf.com   dihah.com   diheb.com   dihec.com   dihef.com
diheg.com   diheh.com   dihib.com   dihic.com   dihid.com   dihif.com
dihig.com   dihih.com   dihil.com   dihim.com   dihin.com   dihir.com
dihob.com   dihod.com   dihof.com   dihog.com   dihoh.com   dilaf.com
dileh.com   dilif.com   dilof.com   diloh.com   dimif.com   dimof.com
dimoh.com   dinif.com   dinih.com   dinob.com   direh.com   dirih.com
diroh.com   disif.com   disod.com   disoh.com   ditaf.com   diteb.com
ditif.com   ditih.com   ditof.com   dobaf.com   dobeb.com   dobef.com
dobeg.com   dobeh.com   dobif.com   dobof.com   doboh.com   docah.com
docef.com   doceg.com   doceh.com   docif.com   docig.com   docih.com
dodib.com   dofaf.com   dofag.com   dofah.com   dofeb.com   dofef.com
dofeg.com   dofeh.com   dofib.com   dofid.com   dofif.com   dofih.com
dofoc.com   dofoh.com   dogaf.com   dogec.com   dogef.com   dogeh.com
dogih.com   dohaf.com   dohag.com   dohah.com   doheb.com   dohed.com
dohef.com   doheg.com   doheh.com   dohel.com   dohib.com   dohic.com
dohih.com   dohir.com   dohof.com   dohoh.com   dolef.com   dolih.com
dolof.com   doloh.com   domef.com   domih.com   donif.com   donih.com
dosaf.com   dosah.com   doseh.com   dosif.com   dosih.com   dosoh.com
dotih.com
Filed under Web Development.
 

Pierre: A Cautionary Tale by Maurice Sendak

 

Among all of the story books my parents read to me as a child, one that really captured my imagination and always stuck with me was, “Pierre: A Cautionary Tale in Five Chapters and a Prologue“, (better known as “I don’t care, said Pierre”).

The book, by the American children’s writer and illustrator Maurice Sendak, (best known for his book “Where the Wild Things Are”, 1963), came as part of a miniture “Nutshell Library”, along with three other books by same author; “Chicken Soup with Rice”, “One was Johnny”, (a counting book) and “Alligators all Around”, (a alphabet book).

PROLOGUE
There was once a boy named Pierre
who only would say, “I don’t care!”
Read his story, my friend,
for you’ll find at the end
that a suitable moral lies there.

CHAPTER I
One day his mother said
when Pierre climbed out of bed
“Good morning, darling boy,
you are my only joy.”
Pierre said, “I don’t care!”

“What would you like to eat?”
“I don’t care!”
“Some lovely cream of wheat?”
“I don’t care!”
“Don’t sit backwards in your chair.”
“I don’t care!”
“Or pour syrup on your hair.”
“I don’t care!”
“You are acting like a clown.”
“I don’t care!”
“And we have to go to town.”
“I don’t care!”
“Don’t you want to come, my dear?”
“I don’t care!”
“Would you rather stay right here?”
“I don’t care!”
So his mother left him there.

CHAPTER II
His father said, “Get off your head
or I will march you up to bed!”
Pierre said, “I don’t care!”

“I would think that you could see”
“I don’t care!”
“Your head is where your feet should be!”
“I don’t care!”
“If you keep standing upside down”
“I don’t care!”
“We’ll never get to town.”
“I don’t care!”
“If only you would say, I care.”
“I don’t care!”
“I’d let you fold the folding chair.”
“I don’t care!”
So his parents left him there.
They didn’t take him anywhere.

CHAPTER III
Now as the night began to fall
a hungry lion paid a call.
He looked Pierre right in the eye
And asked him if he’d like to die.
Pierre said, “I don’t care!”

“I can eat you, don’t you see?”
“I don’t care!”
“And you will be inside of me.”
“I don’t care!”
“Then you will never have to bother”
“I don’t care!”
“With a mother and a father.”
“I don’t care!”
“Is that all you have to say?”
“I don’t care!”
“Then I’ll eat you, if I may.”
“I don’t care!”
So the lion ate Pierre.

CHAPTER IV
Arriving home at six o’clock
his parents had a dreadful shock!
They found the lion sick in bed
and cried, “Pierre is surely dead!”

They pulled the lion by the hair.
They hit him with the folding chair.
His mother asked, “Where is Pierre?”
The lion answered, “I don’t care!”
His father said, “Pierre’s in there!”

CHAPTER V
They rushed the lion into town.
The doctor shook him up and down
and when the lion gave a roar
Pierre fell out upon the floor.
He rubbed his eyes and scratched his head
and laughed because he wasn’t dead.
His mother cried and held him tight.
His father asked, “Are you alright?”
Pierre said, “I am feeling fine
please take me home, it’s half past nine.”

The lion said, “If you would care
to climb on me, I’ll take you there.”
Then everyone looked at Pierre
who shouted, “Yes, indeed, I care!”
The lion took them home to rest
and stayed on as a weekend guest.

The moral of Pierre is: CARE!





Filed under About Me, Humour, Miscellaneous.
 

Quick Social Media buttons in a jQuery function

 

Social Media share buttons

We’ve all seen them, the Tweet this, Like this, Share this social media buttons. They give end users an easy way to share content, whilst providing webmasters with an important promotional service for their sites.

But adding them to your sites can be a bit of a pain. You have to visit a seperate generator page for each social network button, (Twitter buttons, Facebook Like buttons and Google +1 buttons), and fill in all the same details on each one, (your site URL, page URL, text). You then have to cut and paste the three different Javascript snippets into your source code, and if you want to do this on multiple pages, you have to repeat the process to generate unique Javascript code snippets for each URL, which can be incredibly tedious and time-consuming.

This is why I wrote a jQuery function that enables you to quickly and easily add these three buttons to all your pages. It employs the lesser-known iframe method for displaying the buttons, and can be added site-wide to your templates or scripts by including a jQuery function and a couple of lines of code.

Firstly, include your copy of the jQuery library in your document’s header:

<script src="/js/jquery.min.js" type="text/javascript"></script>

… or better still, link to the copy in Google AJAX Libraries, (as using Google’s network of datacenters instead of hosting locally will decrease latency, increase parallelism and improve caching on your site!):

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
    type="text/javascript"></script>

Secondly, include the following jQuery function, either in your document’s header, or in a linked external javascript file. You don’t need to change anything in this script.

<script type="text/javascript">
function social_media_buttons(site,text,page) {
    // First, check if 'social-media-buttons' div exists...
    if ($('#social-media-buttons').length) {

        // Create Twitter button
        $('#social-media-buttons').append('<div id="twitter-button"></div>');
        $('#twitter-button').attr("style","float: left;");
        $('#twitter-button').append('<iframe id="share-twitter"></iframe>');
        var twitter = $('iframe#share-twitter');
        twitter.attr("title", "Twitter Tweet Button");
        twitter.attr("frameBorder", "0");
        twitter.attr("scrolling", "no");
        twitter.attr("marginWidth", "0");
        twitter.attr("marginHeight", "0");
        twitter.attr("allowtransparency", "true");
        twitter.attr("vspace", "0");
        twitter.attr("hspace", "0");
        twitter.attr("tabindex", "-1");
        twitter.attr("style","width: 55px; height: 62px;");
        var src = 'http://platform.twitter.com/widgets/tweet_button.html?count=vertical';
        src = src + '&enableNewSizing=false&lang=en&original_referer=' + site;
        src = src + '&size=m&text=' + encodeURI(text) + '&url=' + page;
        twitter.attr("src", src);

        // Create Google button
        $('#social-media-buttons').append('<div id="google-button"></div>');
        $('#google-button').attr("style","float: left; margin: 2px 8px;");
        $('#google-button').append('<iframe id="share-google"></iframe>');
        var google = $('iframe#share-google');
        google.attr("title", "Google +1 Button");
        google.attr("frameBorder", "0");
        google.attr("scrolling", "no");
        google.attr("marginWidth", "0");
        google.attr("marginHeight", "0");
        google.attr("allowtransparency", "true");
        google.attr("vspace", "0");
        google.attr("hspace", "0");
        google.attr("tabindex", "-1");
        google.attr("style","width: 50px; height: 62px;");
        var src = 'https://plusone.google.com/_/+1/fastbutton?url=' + page;
        src = src + '&useSharedProxy=true&rcache=true&scache=true&size=tall';
        src = src + '&count=true&hl=en-US&parent=' + site;
        google.attr("src", src);

        // Create Facebook button
        $('#social-media-buttons').append('<div id="facebook-button"></div>');
        $('#facebook-button').attr("style","float: left;");
        $('#facebook-button').append('<iframe id="share-facebook"></iframe>');
        var facebook = $('iframe#share-facebook');
        facebook.attr("title", "Facebook Like Button");
        facebook.attr("frameBorder", "0");
        facebook.attr("scrolling", "no");
        facebook.attr("marginWidth", "0");
        facebook.attr("marginHeight", "0");
        facebook.attr("allowtransparency", "true");
        facebook.attr("vspace", "0");
        facebook.attr("hspace", "0");
        facebook.attr("tabindex", "-1");
        facebook.attr("style","width: 60px; height: 62px;");
        var src = 'http://www.facebook.com/plugins/like.php?action=like&href=' + page;
        src = src + '&layout=box_count&show_faces=false&width=450&colorscheme=light';
        facebook.attr("src", src);
    }
}
</script>

Thirdly, on document ready, define your variables and call the function, (place this within the document’s header):

<script type="text/javascript">
$(document).ready(function() {

    var site = "http://www.yoursite.com/";
    var text = "Tell everyone about how great your page is!";

    // This is the url of the page you want to share
    // You can either populate this manually,
    // or let Javascript use the current page value:
    // var page = "http://www.yoursite.com/path/to/page.html";
    var page = window.location.protocol + "://" + window.location.host
             + window.location.pathname;

    social_media_buttons(site,text,page);
});
</script>

Finally, place the buttons where you want them to appear, by adding a <div> with the ID “social-media-buttons” anywhere on your page, like so:

<div id="social-media-buttons"></div>

That’s it, social media buttons! Let me know how you get on…
 
Social Media share buttons

Tags: , , ,

Filed under Useful Code Snippets, Web Development, Websites.
 

Swiss Referendum to Ban PowerPoint?

 

Swiss Referendum to Ban PowerPoint

The Swiss might have been late to the table when it came to giving women the vote, (1971), but they are certainly no strangers to democracy, holding national referendums on just about every conceivable decision.

So it should come as no great surprise, I guess, that a new Swiss political party calling itself the Anti-PowerPoint Party, is proposing a national referendum to have Microsoft’s presentation software PowerPoint banned from Switzerland!

It is estimated that 11 percent of Swiss people have to attend a PowerPoint presentation, (with a minimum of 10 other people), at least twice a week, at a cost to the country of 2.1 billion Swiss Francs, (about $2.5 billion), of economic loss each year. They also add that 85 percent of people find these presentations demotivating.

But what may be even more surprising than those figures is that the Anti-PowerPoint Party (APPP), who see themselves as advocates of approximately 250 Million people worldwide, only need to collect 100,000 signatures in order to hold a national referendum on banning PowerPoint and other similar presentation software in Switzerland!

Where do I sign?…

Tags: , ,

Filed under Current Events, Humour, Technology.
 

How to get a Google+ Invite?

 

Google+ invites

If, like me, you are a bit of a internet geek, then you too are probably desperate to get your hands on a Google+ invite. If you’re not an internet geek, you’re probably asking, “a Google what?“.

Last week Google launched Google+, their new Social Network a la Facebook, to just a select few. But Sign Up closed agin two days later, and now it seems that neither love nor money can get you in.

For the initial two days, those already signed up could invite others by “sharing” something, then adding their friend’s email address to the “Add more people” box below. The recipient would then recieve the shared content by email, with a red button inviting them to “Learn more about Google+” at the bottom. This button would take them to the Sign Up page.

But as of last Thursday, (30th June), no one has been alowed in. Vic Gundotra, Senior Vice President at Google posted “We’ve shut down invite mechanism for the night. Insane demand. We need to do this carefully, and in a controlled way. Thank you all for your interest!”

Visitors to the Google+ Sign Up page are greeted with a message, “Already Invited? We’ve temporarily exceeded our capacity. Please try again soon.“, and a “Keep Me Posted” button to enter your email address for updates.

Various loopholes and workarounds sprung up. For a short period you could still sign up from a Safari mobile browser, using either an iPhone, iPad, iPod Touch or Android phone, or from a Mac computer with Safari’s user agent set to mobile version.

Another loophole was to use Google’s Chrome browser, and install the Google Plus chrome app. Once installed, clicking on the Google+ icon in a new tab would take you to a functioning Sign Up page. But this and other loopholes have been plugged now, and as of time of writing, I was unable to find any way in. Let me know if you have better luck!

PS. 21-year-old singer / songwriter Taylor Swift obviously had more luck than me, she already has her Google+ profile setup, as does recording artist Soulja Boy and FaceBook founder and CEO Mark Zuckerberg!

Tags: ,

Filed under Gossip, Technology, Websites.
 

Microsoft buys Skype: $8bn for a Loss Leader?

 

Microsoft announced today that it has bought Skype for a staggering $8 billion, making it the biggest acquisition in the company’s 36-year history. But despite 124m connected users a month, Skype doesn’t actually make a profit. So why has Microsoft paid $8 billion for a company that last year make a loss of $1 million?

Microsoft are playing up the integration into devices like Xbox and Kinect, Windows Phone, and connect with Lync, Outlook, Xbox Live and other communities. Some believe it’s for simply for the global customer user base.

But I personally think it’s to their answer to iPhone’s FaceTime. I think they foresee a future, a year or two from now, when 25% of the market are walking around having face-to-face conversations with their iPhones, while the rest of their disgruntled users look on in jealousy, and slowly start to succumb to Apple.

Tags: , ,

Filed under Current Events, Gossip, Technology.
 

Resize JPEG images using PHP

 

This is something I have had to do on numerous occasions, and each time I have to look up GD library functions and mess around with several attempts before I get it right, so I figured it was time I wrote a couple of simple PHP functions to handle this. Hopefully you can use them too…

Resize a JPEG to a maximum width and height whilst maintaining the aspect ratio (proportions).

Resize a JPEG whilst maintaining aspect ratio (proportions)

<?php
// LOCATION OF ORIGINAL IMAGE
$orig = "path/to/original_image.jpg";

// DESTINATION OF RESIZED IMAGE
$dest = str_replace(".jpg","_resized.jpg",$orig);

// MAXIMUM NEW WIDTH & HEIGHT (depending on original's aspect ratio)
$w = 200;
$h = 200;

// RUN FUNCTION
ResizeTo($orig,$dest,$w,$h);

// FUNCTION
function ResizeTo($orig,$dest,$h,$w) {
	// GET WIDTH AND HEIGHT OF ORIGINAL
	list($width, $height) = getimagesize($orig);

	// CALCULATE NEW WIDTH AND HEIGHT
	if ($width > $height) {

		// LANDSCAPE
		$new_width = $w;
		$new_height = round($height * ($w / $width));
		if ($new_height > $h) {
			$new_height = $h;
			$new_width = round($width * ($h / $height));
		}

	} else {

		// PORTRAIT
		$new_height = $h;
		$new_width = round($width * ($h / $height));
		if ($new_width > $w) {
			$new_width = $w;
			$new_height = round($height * ($w / $width));
		}
	}

	// OPEN IMAGES IN MEMORY
	$source = imagecreatefromjpeg($orig);
	$thumb = imagecreatetruecolor($new_width,$new_height);

	// RESIZE
	imagecopyresized($thumb, $source, 0, 0, 0, 0,
		$new_width, $new_height, $width, $height);

	// SAVE RESIZED
	imagejpeg($thumb, $dest, 90);

	// DESTROY IMAGES IN MEMORY
	imagedestroy($source);
	imagedestroy($thumb);
}
?>

Sometimes you don’t want to maintain your image’s aspect ratio, you want to resize and crop all images to the same height and width, and for that I created a second function:

Resize and crop a JPEG to a specific width and height

Resize and crop a JPEG to a specific size

<?php
// LOCATION OF ORIGINAL IMAGE
$orig = "path/to/original_image.jpg";

// DESTINATION OF RESIZED IMAGE
$dest = str_replace(".jpg","_croped.jpg",$orig);

// MAXIMUM NEW WIDTH & HEIGHT (depending on original's aspect ratio)
$w = 200;
$h = 200;

// RUN FUNCTION
ResizeCropTo($orig,$dest,$w,$h);

// FUNCTION
function ResizeCropTo($orig,$dest,$h,$w) {

	// GET WIDTH AND HEIGHT OF ORIGINAL
	list($width, $height) = getimagesize($orig);

	// CALCULATE NEW OFFSET POSITION
	if ($width > $height) {

		// LANDSCAPE
		$new_height = $h;
		$new_width = round($width * ($h / $height));
		$y_offset = 0;
		// POSITION IN THE CENTER FOR LANDSCAPE
		$x_offset = ($new_width - $w) / 2);
		if ($x_offset < 0) {
			$new_width = $w;
			$new_height = round($height * ($w / $width));
			$x_offset = 0;
			// WE ERR MORE TO THE TOP ON PORTRAIT
			$y_offset = ($new_height - $h) / 4);
		}

	} else {

		// PORTRAIT
		$new_width = $w;
		$new_height = round($height * ($w / $width));
		$x_offset = 0;
		// WE ERR MORE TO THE TOP ON PORTRAIT
		$y_offset = ($new_height - $h) / 4);
		if ($y_offset < 0) {
			$new_height = $h;
			$new_width = round($width * ($h / $height));
			$y_offset = 0;
			// POSITION IN THE CENTER FOR LANDSCAPE
			$x_offset = ($new_width - $w) / 2); 		}
	}

	// OPEN IMAGES IN MEMORY
	$source = imagecreatefromjpeg($orig);
	$thumb = imagecreatetruecolor($h,$w);

	// RESIZE AND CROP
	imagecopyresized($thumb, $source, $x_offset, $y_offset, 0, 0,
		$new_width, $new_height, $width, $height);

	// SAVE RESIZED
	imagejpeg($thumb, $dest, 90);

	// DESTROY IMAGES IN MEMORY
	imagedestroy($source);
	imagedestroy($thumb);
}
?>

Tags: , ,

Filed under Useful Code Snippets, Web Development.
 

Creepy facial animation girl!

 

New and unsettling facial animation technology that creates a variety of expressions from a single image… developed by those clever Japanese guys at MotionPortrait.
Move your mouse around her head…

Tags:

Filed under Humour, Technology, Web Development.
 

Interwebs Vs. Justin Bieber

 

Poor little Justin Bieber, those nasty people from the Interwebs just won’t stop circulating baseless and derogatory rumors about the 16 year old ‘Baby’ star on an almost daily basis.

So far the list of rumours, ranging from the absurd to the downright obscene, include getting arrested for swearing at the Police (6 June), dying – for the 3rd time (12 June), acquiring syphilis from a hooker (14 June), breaking his neck (15 June), bribing Chris Johnson to cover up the syphilis (16 June), really being only 12 years old (July 4), making a sex tape with Kim Kardashian (18 June), becoming pregnant (21 June), his mother posing topless in Playboy (24 June), being a hermaphrodite (25 June), and having his left testicle removed last week! It’s a wonder he finds time to sing!

Tags: ,

Filed under Celebrities, Gossip, Humour.
 

String abstract PHP function

 

As a web developer, I’m often trying to squeeze text into small spaces, and sometimes the only way is to create a summary, or abstract of the text.

A lot of abstract functions will truncate after n words:

<?php
preg_match('/^([^.!?\s]*[\.!?\s]+){0,n}/', strip_tags($text), $abstract);
echo $abstract[0];
?>

… or truncate after n sentences:

<?php
preg_match('/^([^.!?]*[\.!?]+){0,n}/', strip_tags($text), $abstract);
echo $abstract[0];
?>

… but this isn’t always enough. Three sentences, (or 50 words for that matter), could run anywhere between 150 and 450 characters long, which is a big variation if you only have room to display 180 characters! So here’s my reusable abstract function that will…

… truncate after the last word that appears within your specified character limit:

<?php
function abstract( $string, $len ) {
  if ( strlen($string) > $len ) {
    $pos = ( $len - stripos(strrev(substr($string, 0, $len)), ' ') );
    $sum = substr($string, 0, $pos-1);
    $chr = $sum[strlen($sum)-1];
    if ( strpos($chr, '.,!?;:') ) {
       // STRIP LAST CHAR
       $sum = substr($sum, 0, strlen($sum)-1);
    }
    // ADD ELLIPSIS
    return $sum."&#8230;";
  } else {
    return $string;
  }
}
echo abstract( $string, 180 );
?>

Tags:

Filed under Useful Code Snippets, Web Development.