tag:blogger.com,1999:blog-41820293743547937852024-03-12T14:52:05.349+10:00Random Acts of Sentience"Random Acts" is a blog about things of interest, software, technology, religion (or the lack of it), politics and philosophyAnonymoushttp://www.blogger.com/profile/18378794376116903578noreply@blogger.comBlogger300125tag:blogger.com,1999:blog-4182029374354793785.post-17113471942296872572022-03-29T20:59:00.001+10:002022-03-29T20:59:26.052+10:00The Wish<p>Darkness. Silence. Then a faint sliver of light of light forms and illuminates a padded curved wall. Dust motes dance in the sliver as it expands and sweeps gently across the padding. The expanding arc of light moves further and touches a motionless hand. As it expands the reflection from the white padding gradually shows that the wall describes a short tube about four feet wide and seven long. In one wall a bank of instruments lies below a square porthole from which the light streams.</p><p>The light sweeps onward and crosses the face of a young man. The look of innocence. Secure sleep contrasting with the ugly gash on his cheek around which dried blood has formed. As the light moves across his face, a faint frown appears and this head moves dreamily to one side. Passing over his face the light falls on his shoulder and onto the badge there. The gold lettering "Interstellar Brigade" and the twin lightning bolts cause a brief flash of coloured reflection on his face,</p><p>The illuminating beam crawls away from the man and begins to contract as it moves slowly up the other wall. Eventually it shrinks to a thin line and darkness returns.</p><p>The darkness seems complete, but a small red light begins to flash on the instrument panel. A faint hum and hiss enters but ends quickly. A slight shudder shakes the young man and a deep sigh escapes his lips. He screws up his eyes and flexes his hands. He blinks and lifts his head slowly.</p><p>Understanding floods into him and his eyes open wide. Panic contorts his features as a cry of fear bursts from his throat. He tosses his head back and pushes against the wall. His heart pounds and adrenalin begins to surge into his system. In panic he grips the instrument panel and pulls himself to the porthole.</p><p>Blackness. And a faint smear of light to his left. Stretching around he presses his face against the surface and strains to see in that direction. As he watches a curved green blue line appears and as it expands he finds himself looking down of the surface of a planet.</p><p>Letting go of the panel he moves backward in the zero gravity. As he touches the wall, velcro strips on his torn flight suit cling to the padding. Bringing his breathing under control, he looks at the instruments. They seem unfamiliar to him and his brow furrows. A large button marked "General Information" attracts his attention. He presses it firmly.</p><p>"Welcome to Delta Systems escape pod number 5", the soft ladies voice began. "As you may be aware, the craft you were travelling in experienced some difficulties. To protect you fully in the case of such an emergency, Delta Systems has developed this escape pod to provide you with a means of survival while a rescue ship arrives. The automatic systems have revived you from your sleep as we are approached by that ship. This pod has air for two hours normal use, but don't worry. You will shortly be docking with the rescue ship and be provided with all your needs. Thank you for flying Delta Systems."</p><p>Silence returned. The shock of the mans face melted as a smile swept across it. He threw back his head and laughed. Tears welled up in his eyes as the laughter swelled in him. His laughter changed and he started to cry. Wailing and sniffing as the light from the star streamed back through the porthole and ran obliviously past him as the pod rolled gently around.</p><p>He floated stationary for a long time, looking through the porthole as the vista below moved past him. He could see the weather patterns on the planet and watched the onset of evening on the surface. </p><p>"You bastards", he said softly and looked down at the badge on his arm. Reaching across himself he ripped it off in one violent motion.</p><p>"Interstellar Brigade", he spat out. "Mercenaries, idiots, cheapskates For god's sake a commercial escape pod! It was supposed to be a military ship not a pleasure cruise!"</p><p>He tried to throw the badge away, but it just floated gently to the end of the pod and drifted in the air.</p><p>"A rescue ship..", he parodied the womans voice. "There's no rescue ship! I'm stuck in a pod with no guidance system in orbit above a probably empty planet with no food, no radio and precious little air!"</p><p>His breath became ragged and his anger rose. "You bastards!", he shouted, banging his fists against the panel. He raged on, "You unbelievable bastards! How could you let men go out in a ship like that? How could you put this kind of shit on board? A commercial pod? Was it going cheap?"</p><p>His stopped and closed his eyes. "Money", he muttered. "You got paid and you didn't care." His lip curled and he felt the anger again, "I bet you're in a bar aren't you? When I get out of this I'm gunna..." A wave of nausea rose and he choked it back.</p><p>A dry whimper forced itself from his lips. "I'm going to die." He wrapped his arms around himself and squeezed his eyes tight. "Get a grip", he muttered through clenched teeth. Feeling control returning. He opened his eyes and took a deep breath,</p><p>He thought about how he had arrived at this point. His outrage at the United Planets approach to the war. His joining up. Feeling superior about convincing the little group in that bar that he was experienced. Showing his talent with the computer. Decided that going with the mercenaries could make a difference. His doubts when he saw the crew and the ship. "Nutcases and adventurers, but I'll make it." Watching the air lock close, shutting off the last views of his homeland.</p><p>He felt sadness overtake him as he thought of his parents. They would never know what had happened to him. He tried to breathe deeply but couldn't. The air was running out.</p><p>He looked down at the planet below and thought of dying slowly gasping for breath. He reached a decision.</p><p>"If I'm going to die, it's going to be on my terms!" And he started to pull at the edge of the instrument panel. It was not firmly held and snapped away after a short struggle. With the panel exposed, he examined the wires behind it. The colour coding told him what he needed, Gripping one he pulled it away from the panel and tore some shielding off with his teeth. Taking the bare wire he stretched it across to a contact. There was a crack and spark as the electricity flowed.</p><p>He found himself being pushed back against one wall as a shudder and faint roar indicated that an attitude jet had fired. The gentle movement caused the view of the planet to slow and finally begin spinning in the opposite direction. The spin grew faster and he could no longer look out of the porthole as it was making his head spin. He leaned back and waited. Already he could feel the temperature rising.</p><p>"So be it. A meaningless life. A meaningless death", he whispered.</p><p>On the surface of the planet two figures moved carefully through the dark. They wore animal skins and moved with a surety born of intimacy with nature. As they approached the camp fire, the smaller one, a young girl stopped and gazed skywards.</p><p>The mother stopped also and turned. "What is it?", she queried.</p><p>"Look mother!" The girl cried and as the woman cast here eyes skyward a fiery streak of gold light burst high overhead. The woman turned back to the child. "A good omen!" The child smiled.</p><p>"Go on", the mother continued.</p><p>"Make a wish."</p><p><br /></p>Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-764545403411674582021-01-20T10:20:00.001+10:002021-01-20T10:23:42.630+10:00A Proposal for using a new National Guard Public Health Agency that integrates vaccine rollout, GND and M4A<p>Serious question: Could Biden use the vaccine rollout to create something like public clinics (call it National Guard Public Health Agency) staffed by National Guard health workers in each state/county that are cost-free?</p><p>This is a bit messy as it it c'n'p from a twit thread. Sorry.</p><p>It would not be difficult to use de-mountable buildings instead of tents or gymnasiums etc.</p><p>Since the NG could be used as the major delivery pipeline, then it makes sense to have them use some public land to create distribution/staging etc areas.</p><p>Then over the time, those buildings become semi-permanent. </p><p>It just seems staggeringly obvious to co-opt the NG to do the vacc rollout. </p><p>But what do I know, I'm just an Grumpy Old (64) Gamer Lady from Australia who would like to see the NG being used for public good.</p><p>I know I'm not an American, but I lived there in the 80's and it saddens me to see the slow disintegration. </p><p>Dangit. I wish there was a discord or whatever where this kind of issue can be discussed at length. </p><p>I really think the basic idea has legs. </p><p>Also it neatly fits into the GND where "green zones" could be established on the highway system that could be powered by solar/wind etc. </p><p>I have many gamer friends in the US who can see this working. </p><p>It will take bold big integrated projects to invigorate the people and provide solid results. </p><p>If people actually see the govt doing real things that benefit them directly happening "just down the road" from where they live.</p><p>Also fitting into the GND, Biden has said he would be rebuilding the hwy system and it seems to me that having "green zones" built using labor from the local area fits in neatly. </p><p>Good jobs, good education, good pay, good prospects, real direct local impact. </p><p>And switching NG small vehicles to EVs and establishing EV chargers in the "green zones" would spur the move away from ICEs to EVs. </p><p>#StopBurningStuff Seems like a no-brainer.</p><p><br /></p>Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-26207472921311223652020-10-05T11:21:00.003+10:002020-10-05T19:06:29.455+10:00Sympathy for the Don<p><span style="font-family: verdana;">Please allow me to introduce myself</span></p><p><span style="font-family: verdana;">I'm a man of no wealth or taste</span></p><p><span style="font-family: verdana;">I've been around for a long, long years</span></p><p><span style="font-family: verdana;">Stole a million MAGAs souls on faith</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">And I was 'round when Hillary</span></p><p><span style="font-family: verdana;">Had her moment of doubt and pain</span></p><p><span style="font-family: verdana;">Made damn sure that Christie</span></p><p><span style="font-family: verdana;">Was ordered home and sealed his fate</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Pleased to meet you</span></p><p><span style="font-family: verdana;">All I have is my name</span></p><p><span style="font-family: verdana;">But what's troubling you is </span></p><p><span style="font-family: verdana;">Why so many play my game</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">I stuck around New York</span></p><p><span style="font-family: verdana;">When I saw it was a time for a change</span></p><p><span style="font-family: verdana;">Attacked Coumo and his ministers</span></p><p><span style="font-family: verdana;">Chris screamed in vain</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">I'm orange and fat</span></p><p><span style="font-family: verdana;">And I sold MAGA hats</span></p><p><span style="font-family: verdana;">While the virus spread</span></p><p><span style="font-family: verdana;">And the jobs went away</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">I rode an SUV</span></p><p><span style="font-family: verdana;">Held a presidents's rank</span></p><p><span style="font-family: verdana;">While the virus raged</span></p><p><span style="font-family: verdana;">And the suckers cheered and stank</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Pleased to meet you</span></p><p><span style="font-family: verdana;">The candidate with zero class</span></p><p><span style="font-family: verdana;">But I made sure</span></p><p><span style="font-family: verdana;">That Cruz and Graham kissed my ass.</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo, woo woo)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">I watched with glee</span></p><p><span style="font-family: verdana;">While your Reps and Senators</span></p><p><span style="font-family: verdana;">Fought for ten decades</span></p><p><span style="font-family: verdana;">For the parties they made</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo, woo woo)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">I shouted out</span></p><p><span style="font-family: verdana;">Who killed the Kennedys?</span></p><p><span style="font-family: verdana;">I blamed it on Cruz's dad</span></p><p><span style="font-family: verdana;">And Ted still loves me</span></p><p><br /></p><p><span style="font-family: verdana;">(Who who, who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Let me please introduce myself</span></p><p><span style="font-family: verdana;">I'm a man of no wealth or taste</span></p><p><span style="font-family: verdana;">And I laid traps for sycophants</span></p><p><span style="font-family: verdana;">And laid your party to waste</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo, who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Pleased to meet you</span></p><p><span style="font-family: verdana;">All I have is my name, oh yeah</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">But what's puzzling you</span></p><p><span style="font-family: verdana;">Is why I have no shame</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Who who, who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Pleased to meet you</span></p><p><span style="font-family: verdana;">Hope you guessed my name, oh yeah</span></p><p><span style="font-family: verdana;">But what's confusing you</span></p><p><span style="font-family: verdana;">Is why I have no shame</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo, who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Just as every kamala is a cop</span></p><p><span style="font-family: verdana;">And all the supremicists saints</span></p><p><span style="font-family: verdana;">As news is fake and you listen to me</span></p><p><span style="font-family: verdana;">Just call me Don</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">'Cause I'm in need of some restraint</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Who who, who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">So if you meet me</span></p><p><span style="font-family: verdana;">Have some courtesy</span></p><p><span style="font-family: verdana;">Have some sympathy, and some taste</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Use all your well-learned politness</span></p><p><span style="font-family: verdana;">Or I'll lay your party to waste, mm yeah</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Woo woo, woo woo)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Pleased to meet you</span></p><p><span style="font-family: verdana;">All I have is my name, mm yeah</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">(Who who)</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">But what's puzzling you</span></p><p><span style="font-family: verdana;">Is the nature of my game, mm mean it, get down</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Tell me baby, do you like my name</span></p><p><span style="font-family: verdana;">Tell me honey, can ya take my name</span></p><p><span style="font-family: verdana;">Tell me baby, what's my name</span></p><p><span style="font-family: verdana;">I tell you one time, you're to blame</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">What's my name</span></p><p><span style="font-family: verdana;">Tell me, baby, what's my name</span></p><p><span style="font-family: verdana;">Tell me, sweetie, what's my name</span></p><p><span style="font-family: verdana;"><br /></span></p><p><span style="font-family: verdana;">Oh, yeah</span></p><div><br /></div>Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-74023340866536894072016-09-19T00:27:00.001+10:002016-09-19T00:27:32.458+10:00Leak this: A Concerned Member of the Rest of the WorldFrom: a.concerned.member.of.the.rest.of.the.rest.of@world.com<br />
To: everybody.in.the.the.corporate@states.of.america.com<br />
Subject: Hello? Hello? Is there anybody in there?<br />
<br />
Ok. We've watched the show.<br />
Geting tired.<br />
And worried.<br />
Due to a slight issue with your constitution and electoral college system, you seem to have a problem.<br />
We.<br />
The rest of the world.<br />
Are...<br />
Well...<br />
Concerned.<br />
It seems like you've missed the point.<br />
We have universal health care and... Oh we don't need to go on. It's all there.<br />
In policies similar to, but not far enough, Bernie.<br />
So...<br />
We have to ask:<br />
<br />
What The Fork Are You Doing?<br />
You have to choose between two megalomaniacs?<br />
Why?<br />
Seriously.<br />
Why?<br />
One will get to the oval office and spin the chair around whooping "I did it! WooHoo!".<br />
And the other will ask where the cameras and lights are for the upcoming series:<br />
- Apprentice: Dept of Justice<br />
- Apprentice: Supreme court<br />
<br />
Ok.<br />
Time to grow up.<br />
Please.<br />
Please stop this.<br />
It's just silly.<br />
Stop it.<br />
Please.<br />
<div>
<br /></div>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-30770176114237130282016-09-18T17:29:00.000+10:002016-09-18T17:29:41.189+10:00I AM NOT A "SENIOR"And speaking of birthdays...<br />
Had my 60th recently.<br />
And received a news letter from my local MP.<br />
Here's a photo:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTE8VtdQ7Nv6uC4JlQAZsCkHI6_9qGBSaK9Jf3iEWx560fArb9JdnuGx0sJt73TPvgG2WZE3SFy2G_N963BGNVucXlwFXIIZ4sTzV8W_6fEjpOWPkq7HEipAmt73im3_ZNk928TFmZDMOH/s1600/20160918_140413.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTE8VtdQ7Nv6uC4JlQAZsCkHI6_9qGBSaK9Jf3iEWx560fArb9JdnuGx0sJt73TPvgG2WZE3SFy2G_N963BGNVucXlwFXIIZ4sTzV8W_6fEjpOWPkq7HEipAmt73im3_ZNk928TFmZDMOH/s320/20160918_140413.jpg" width="180" /></a></div>
<br />
Bastard.<br />
I threw a tantrum and hurled it across the room.<br />
An admittedly restrained tantrum as I had to maneuver my walker and take my medication.<br />
Ben, being sane and unwilling to face my ungodly wrath, left it where it was.<br />
That was some days ago now.<br />
It's been sitting there like a malevolent pixie jeering at me from the corner.<br />
"I AM NOT A SENIOR!" I mutter under my breath...<br />
Bastard.<br />
I picked it up and it will be going on the BBQ tonight.<br />
Bastard.<br />
I'll be dropping a baseball bat, a roll of barbed wire and instructions on how to insert it into various orifices on my local MPs doorstep when the battery on my mobility scooter has charged.<br />
<div>
<br /></div>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-91982774479267423142016-08-29T10:42:00.000+10:002016-08-29T10:42:13.868+10:00I hate airports and air travel in generalI hate airports and air travel in general.<br />
Recently we had a short notice requirement to fly to a wedding.<br />
And they didn't have business class.<br />
Sigh.<br />
I'd rather have driven as you get to see interesting places, people, trees, green fields and what not.<br />
But airports?<br />
I hate airports.<br />
I sat there gazing at the herd (some of whom were literally unwashed), and felt airports are a metaphor for life.<br />
Heaven and hell.<br />
Blue skies and pain.<br />
Practically strip searched before being allowed entry by stern faced gate keepers.<br />
Sitting on uncomfortable chairs for ages in boredom and pain.<br />
Surrounded by steel, plastic and faux-wood outlets selling rubbish at outrageous prices.<br />
Signs everywhere telling you where you're allowed to go and where not.<br />
Deafened periodically by fake calm voices warning you about leaving your life un-attended.<br />
People milling about desperately clutching their crumpled boarding passes as if it was their personality.<br />
And all balefully watched over by machines of unloving grace.<br />
The air of despair and boredom seemed palpable.<br />
It almost felt like most people had a "running fearfully from" rather than a "running joyously to" mentality.<br />
Then standing in line at the gate desperately trying to be first to get into a tin tube filled with economy seats.<br />
Seats? Torquemada would have taken one look at those bum numbing, elbow crushing instruments of torture and smiled.<br />
Jamming your life into lockers and watching others brutally shove theirs in front of yours.<br />
Having a lower back massage for hours provided by the manic kid behind you.<br />
Drinking excessively to drown out the crying children and trying to sleep through the torture.<br />
Arriving at yet another airport virtually indistinguishable from the first.<br />
Frantically pushing through the mindless milling mass to get to the exit.<br />
Oh yes.<br />
I hate airports.<br />
I weep for humanity.<br />
<br />
What's your nomination for the worlds worst airport building?<br />
Terminal 4 Heathrow?<br />
The James Watson building LA?<br />
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-22856751409054620232015-10-12T22:39:00.000+10:002015-10-12T22:39:41.635+10:00Holy Thor! My blog just got scraped by someone in Israel!So... Yeah...<br />
<br />
I have a blog.<br />
Mostly articles about movies, tech and science.<br />
I get roughly 2,000 to 3,000 views per month.<br />
<br />
And recently I posted an article about the recent change of PM in Australia.<br />
It included the word "Palestine".<br />
And on one day... Actually in one hour... I got 1,932 page views.<br />
<br />
Wait. What?<br />
Why?<br />
I'm not important.<br />
I just comment on some issues I feel relevant to the events of the day.<br />
<br />
So just what did my stats show?<br />
This:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_jpoKV-JYc4ovdHI_2xzAKSLbTpUUzCq4PQ0L2MNuPUT_RnGq4ueLJUN0DMPj0_Bz8H2sHOXbeksrI7_rhWyVbAW3IbShZW4vQcTxxnJZgQmLUts6jOce63Q3FzvpRUiOtxMcpxaHlz7/s1600/israel1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_jpoKV-JYc4ovdHI_2xzAKSLbTpUUzCq4PQ0L2MNuPUT_RnGq4ueLJUN0DMPj0_Bz8H2sHOXbeksrI7_rhWyVbAW3IbShZW4vQcTxxnJZgQmLUts6jOce63Q3FzvpRUiOtxMcpxaHlz7/s1600/israel1.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5L9gdUHXTQP3YE-NxslYFNAHmkWt6Ma6uqw2lRx6VariApz4LmuhO0SViyAS-5UDZEpWUEu56AT9Q0-_s6AeK-wiLFFKMNnfdwwOqKVPyfkNjq5bUjkmNQYr4V-OVSM73XFRcW1uKoknb/s1600/israel2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="97" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5L9gdUHXTQP3YE-NxslYFNAHmkWt6Ma6uqw2lRx6VariApz4LmuhO0SViyAS-5UDZEpWUEu56AT9Q0-_s6AeK-wiLFFKMNnfdwwOqKVPyfkNjq5bUjkmNQYr4V-OVSM73XFRcW1uKoknb/s320/israel2.png" width="320" /></a></div>
<br />
<br />
Oh lord.<br />
So... I'm not actually saying Mossad have scraped my site.<br />
But seriously...<br />
I have 1,932 pages that feel relevant to someone in Israel?<br />
<br />
Wow. Thanks guys.<br />
I had no idea I had written many posts.<br />
<div>
Hope you like them.</div>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-25429190086409948572015-09-16T07:09:00.002+10:002015-09-16T07:09:22.752+10:00So... Yeah... Australia has a new prime minister... Oh. And goats. And a giraffe.Because?<br />
It was a Monday that's why.<br />
<br />
What is it with new these people?<br />
<br />
And what is it with the "Prime" part?<br />
<br />
Now Optimus Prime had it right.<br />
He led the Transformers for years.<br />
So maybe Mal should change his name to "Malcolm Prime".<br />
Maybe he'd last longer.<br />
<br />
And just why do they want to be prime minister?<br />
<br />
After all, the first thing our new one did is re-affirm the old ones stance on climate change and marital equality.<br />
Wait.<br />
What?<br />
Why take the leadership and then say the same as the previous nut job?<br />
Is it the money? The groupies?<br />
<br />
And apparently they all still think that marriage equality is "Redefining Traditional Marriage."<br />
Wait.<br />
What?<br />
<br />
It's already been redefined dozens of times you dumb ass.<br />
<br />
Imagine 4AD Palestine.<br />
So... Here's my father and Ben comes up, points at me and says "Hey. I'll have that one."<br />
<br />
"Oh. Ok." says my father and picks up his holy book.<br />
<br />
Starts thumbing through it and says "Oh. Sorry. Forgot. I'm an illiterate goat herder. Let's go and see a holy man."<br />
<br />
So we all walk off to the temple because the government hasn't invented public transport yet.<br />
Or clean water.<br />
<br />
And the holy man thumbs through the holy book and picks one of the many "Traditional" marriages in his book and says:<br />
<br />
"Ah yes. Here's one that fits. That'll be three goats and a cow."<br />
<br />
And I'm "What the fuck?" although I can't use that last word because it wasn't invented until medieval times.<br />
<br />
So Ben says "Wait. Can't I just have her as a slave and marry her later? Kinda like layby?"<br />
<br />
And the holy man grits his teeth and says "Well... That is in the book. But the goats and cow thing is the traditional thing at the moment. So there you go."<br />
<br />
And I'm stunned and "Seriously? Hey I'm worth more than that. The surgery alone is going to cost more than that."<br />
<br />
So I turn to Ben and say:<br />
<br />
"Three goats and a cow? No way dude. You want me you gotta get three goats and a giraffe. Haul your ass down to Kenya and bring back one of those fuckers."<br />
<br />
He stares at me.<br />
<br />
"And don't be thinking you can just lead it into Jerusalem. You gotta ride that bad boy."<br />
<br />
"Traditional Marriage" my ass.<br />
<br />
I want an AWESOME marriage.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-74709312617248628052015-08-17T11:53:00.002+10:002015-08-17T11:53:44.906+10:00Deleting/Reinstalling RubyMine on Mac OS-XI've been upgrading my RubyMine installation for ages now as new versions and updates have occurred.<br />
<br />
Recently I had the beginnings of Settings-Hell where settings vanished or inspections switched on or off randomly.<br />
<br />
Furthermore I had a bunch of weird "Open-A-File-And-RM-Switches-To-A-Different-Project" issues.<br />
<br />
So I decided it was time to whack it from my machine and re-install it.<br />
<br />
For posterity here are the steps:<br />
<br />
Next create a backup folder to save your existing install if anything goes wrong:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">mkdir ~/RubyMineBackup
mkdir ~/RubyMineBackup/Preferences
mkdir ~/RubyMineBackup/Caches
mkdir ~/RubyMineBackup/Application\ Support
mkdir ~/RubyMineBackup/Logs
mkdir ~/RubyMineBackup/Applications
</pre>
<br />
Next RubyMine and under <code>Help->Register</code> copy your user name and license key somewhere safe (such as the backup folder).<br />
<br />
Now move all the preferences, caches, logs and the application itself to that backup folder:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">mv ~/Library/Preferences/Rubymine70 ~/RubyMineBackup/Preferences
mv ~/Library/Preferences/Rubymine71 ~/RubyMineBackup/Preferences
mv ~/Library/Caches/RubyMine70 ~/RubyMineBackup/Caches
mv ~/Library/Caches/RubyMine71 ~/RubyMineBackup/Caches
mv ~/Library/Application\ Support/RubyMine70 ~/RubyMineBackup/Application\ Support
mv ~/Library/Application\ Support/RubyMine71 ~/RubyMineBackup/Application\ Support
mv ~/Library/Logs/RubyMine70 ~/RubyMineBackup/Logs
mv ~/Library/Logs/RubyMine71 ~/RubyMineBackup/Logs
mv /Applications/RubyMine.app ~/RubyMineBackup/Applications
</pre>
<br />
(Obviously you may not need both the <code>70</code> and <code>71</code> folders. Check your machine for the folders)<br />
<br />
Now go to JetBrains and re-download the latest version.<br />
Start it up and enter your registration details.<br />
<br />
FYI While starting I tend to switch to the "Darcula" theme.<br />
<br />
Now shut RM down and do this to start RM under JDK 1.7 or newer:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">vi /Applications/RubyMine.app/Contents/Info.plist
</pre>
<br />
Roughly line 87, you'll see this:<br />
<br />
<pre class="brush: xml;" type="syntax highlighter"><key>JVMVersion</key>
<string>1.6*,1.7+</string>
</pre>
<br />
Change the "<string>" value to this:<br />
<br />
</string><br />
<pre class="brush: xml;" type="syntax highlighter"><string>1.7+,1.6*,1.7+</string>
</pre>
<br />
I like more memory as I often have up to 7 or 8 projects open simultaneously.<br />
<br />
So copy the <code>rubymine.vmoptions</code> file:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">cp /Applications/RubyMine.app/Contents/bin/rubymine.vmoptions ~/Library/Preferences/rubymine70
</pre>
<br />
Now edit the <code>~/Library/Preferences/rubymine70rubymine.vmoptions</code> file from this:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:+UseCompressedOops
</pre>
<br />
To this:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">-Xms256m
-Xmx1024m
-XX:MaxPermSize=250m
-XX:+UseCompressedOops
</pre>
<br />
Now re-start RubyMine.<br />
<br />
Once it's up install your plugins.<br />
I use these ones:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">Docker integration
IDETalk
Markdown support
.ignore
BashSupport
Bootstrap 3
Dash
Git Flow Integration
GitLab integration
</pre>
<br />
YMMV but mine seems to be much more stable now.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-46856070122753058572015-07-24T15:10:00.001+10:002015-07-24T15:10:26.559+10:00"rvm install jruby-9.0.0.0" insists on installing pre1, rc1 or rc2So... Yeah...<br />
<br />
Been eagerly awaiting jruby-9000. And used rvm to install the pre1, rc1 and rc2 versions for testing against micro-services.<br />
<br />
Then crashed right into a problem when the final release came out.<br />
<br />
I tried to "<code>rvm install jruby-9.0.0.0</code>" and it said there was already a cached version "<code>ruby-9.0.0.0-pre1</code>".<br />
<br />
Ok I thought, so I did "<code>rvm list</code>" and uninstalled all the previous jrubies.<br />
<br />
Then removed any reference to jruby from "<code>~/.rvm/archives</code>".<br />
<br />
Then "<code>rvm get stable</code>".<br />
<br />
Then "<code>rvm install jruby-9.0.0.0</code>" again.<br />
<br />
To my chagrin, it did this:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">Searching for binary rubies, this might take some time.
Found remote file https://s3.amazonaws.com/jruby.org/downloads/9.0.0.0.pre1/jruby-bin-9.0.0.0.pre1.tar.gz
...compilation elided...
</pre>
<br />
Guessing that there may actually be a release version on s3, I wget'd "<code>https://s3.amazonaws.com/jruby.org/downloads/9.0.0.0/jruby-bin-9.0.0.0.tar.gz</code>"<br />
<br />
Luckily that worked and I copied the file to "<code>~/.rvm/archives</code>".<br />
<br />
I uninstalled and removed the other "<code>pre1</code>" version and tried again.<br />
<br />
But no.<br />
Despite having <code>jruby-bin-9.0.0.0.tar.gz</code> in the archives folder, <code>rvm</code> insists on downloading the pre1 version.<br />
<br />
Then the "Ahaha!"<br />
<br />
After mucking about with <code>rvm</code> <code>--debug</code> and <code>--trace</code> commands I found this wonderful thing in the output (which was frickin ginormous):<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">+ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() 12 > [[ -z jruby-9\.0\.0\.0.* ]]
#Ed: This looks interesting...
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() -221 > command cat /Users/kimberleyscott/.rvm/config/known_strings
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() -219 > __rvm_version_sort
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() -218 > __rvm_tail -n 1
#Ed: Notice the regex
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() -220 > __rvm_grep 'jruby-9\.0\.0\.0.*'
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() -463 > cat /Users/kimberleyscott/.rvm/config/known_strings
++ 1437712726.N /scripts/functions/support : __rvm_tail() 0 > tail -n 1
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort() 1 > LC_ALL=C
++ 1437712726.N /scripts/functions/support : __rvm_grep() 0 > GREP_OPTIONS=
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort() 1 > command sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n
++ 1437712726.N /scripts/functions/support : __rvm_grep() 0 > command grep 'jruby-9\.0\.0\.0.*'
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort() -167 > sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n
++ 1437712726.N /scripts/functions/support : __rvm_grep() -260 > grep 'jruby-9\.0\.0\.0.*'
# Ed: and here is the result:
+ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest() 20 > new_ruby_string=jruby-9.0.0.0.pre1
</pre>
<br />
Well... "<code>~/.rvm/config/known_strings</code>" looks like an interesting file doesn't it?<br />
<br />
And lo and behold, I can now see how the rvm script decided on pre1.<br />
so I changed this:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter"># this strings are matched only when partial version was provided
jruby-1.7.19
jruby-9.0.0.0.pre1
</pre>
<br />
to this:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter"># this strings are matched only when partial version was provided
jruby-1.7.19
#jruby-9.0.0.0.pre1 - commented for safety
jruby-9.0.0.0
</pre>
<br />
And did a fresh "<code>rvm --debug install jruby-9.0.0.0</code>".<br />
Loads of green and purple output.<br />
But wayhey! Installed.<br />
<br />
rum now shows it installed:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">rvm rubies
* jruby-1.7.19 [ x86_64 ]
jruby-1.7.20 [ x86_64 ]
jruby-1.7.21 [ x86_64 ]
=> jruby-9.0.0.0 [ x86_64 ]
ruby-2.2.0 [ x86_64 ]
ruby-2.2.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
</pre>
<br />
Hope this helps others!<br />
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com2tag:blogger.com,1999:blog-4182029374354793785.post-59331011642478527002015-04-22T22:39:00.001+10:002015-04-22T22:45:14.374+10:00Resonant Rise 3 Java Settings to reduce lagI've begun a new Youtube series covering Resonant Rise 3 (3.2.5.3-RC-MAIN).<br />
In the process I discovered it lags.<br />
HORRIBLY.<br />
<br />
As my Linux server decided to sulk and fail to boot, I'm using a late model Mac Mini as a server.<br />
The clients are late model iMacs.<br />
This is OBVIOUSLY SUB-OPTIMAL.<br />
I'm organising a replacement linux server which I will use in our upcoming videos.<br />
<br />
So I did a metric shit ton of digging and finally found a series of settings for the server and client that reduce that lag considerably.<br />
So...<br />
Yeah...<br />
You keep getting:<br />
<br />
<blockquote class="tr_bq">"Can't keep up! Did the system time change"</blockquote><br />
Messages?<br />
<br />
Then do this.<br />
<br />
On your servers LaunchServer.sh:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">#!/bin/bash
set -x
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
export PATH=${JAVA_HOME}/bin:${PATH}
opts="-server -XX:+TieredCompilation \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \
-XX:+UseCMSInitiatingOccupancyOnly"
java -Xmx2G -XX:MaxPermSize=256M $opts -jar forge-1.7.10-10.13.2.1291-universal.jar nogui
</pre><br />
(Slashes added for readability)<br />
<br />
Of course this assumes you're using Java 1.7 update 71.<br />
I tried JDK 1.8 and it gave me a whole bunch of grief.<br />
So I decided to switch back to JDK 1.7 and see if that helped.<br />
It did.<br />
Suddenly the Mac Mini used all 4 cores instead of just 2 and the client side (iMac) sped up considerably.<br />
<br />
Ok. Now client side.<br />
In the ATLauncher settings, choose 'Settings' and:<br />
<br />
For the Java path use: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home<br />
(Again assuming you have 1.7 update 67 - change to suit)<br />
<br />
And for the Java parameters:<br />
<br />
<pre class="brush: bash;" type="syntax highlighter">-server -XX:+TieredCompilation \
-XX:CompileThreshold=1500 \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \
-XX:+UseCMSInitiatingOccupancyOnly
</pre><br />
(Slashes added for readability)<br />
<br />
MANY THANKS TO <a href="https://plus.google.com/+JohnPaulAlcala/posts/FUKJ3QhZJ8w">https://plus.google.com/+JohnPaulAlcala/posts/FUKJ3QhZJ8w</a> !<br />
<br />
YMMV.<br />
<br />
I'm still hunting for "The Perfect Seed" for videos, and will get back to making videos as soon as my current IRL workload decreases.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-5390357559627030012015-04-01T13:57:00.002+10:002015-04-01T13:57:55.373+10:00Where does chrome store open tabs information?Recently I had a problem with a upgrade from Mavericks to Yosemite.<br />
The upgrade failed.<br />
Catastrophically.<br />
But I had backed up all the main folders I might need in case of such a folder.<br />
<br />
For reference, these are:<br />
<br />
- /private<br />
- /Library<br />
- /Applications<br />
- /Users/my_home_folder<br />
<br />
I had to burn the machine and install Yosemite from scratch.<br />
<br />
Now one of the things I wanted to recover was the current tabs I had open in Chrome.<br />
The reason being was that some of them were very, very interesting and I had not bookmarked them.<br />
<br />
I did a little bit of research, but not much turned up.<br />
So I figured it out myself.<br />
<br />
Let's say you have a folder ~/OldMachineBackup and it has the folders mentioned above in it.<br />
<br />
So to find out what tabs you had open:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">cd ~/OldMachineBackup
strings Application\ Support/Google/Chrome/Default/Current\ Tabs | egrep '^http' | sort | uniq
</pre><br />
And there you have them. A list of http addresses.<br />
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-39187520942668418262015-03-18T10:45:00.001+10:002015-03-18T10:45:26.176+10:00Upgrading the docker service from 1.3 to 1.5 on Ubuntu 14.04Recently I had to upgrade a production server to ensure it was running the latest version of docker (1.5.0 at time of writing).<br />
<br />
The current install was 1.3.1 and we wanted all docker servers to be identical.<br />
<br />
First up, assume you have done a sudo -i to ensure all commands are run as root.<br />
<br />
Also, some commands are prefixed with $ . This is to identify the command from it's output.<br />
<br />
And further, I have used bogus IPv4 addresses for certain URLs.<br />
<br />
For reference, I used 10.0.0.3 as the docker server IP.<br />
<br />
<pre class="brush: bash;" type="syntax highlighter"># First some useful commands
# Useful to find files in packages or use packages.ubuntu.com
apt-file search nslookup
# -------------------------------------------------------------------
# Install tree and dnsutils (nslookup and friends)
# -------------------------------------------------------------------
apt-get install tree dnsutils
# -------------------------------------------------------------------
# Kill all containers
# -------------------------------------------------------------------
docker ps -a | egrep 'ls-api' | awk '{ print $NF; }' | xargs docker kill
docker ps -a | egrep 'ls-api' | awk '{ print $NF; }' | xargs docker rm
# -------------------------------------------------------------------
# Kill all images
# -------------------------------------------------------------------
docker images -q --filter "dangling=true" | xargs docker rmi
docker images | grep -v REPOSITORY | awk '{ print $3; }' | \
sort | uniq | xargs docker rmi
# -------------------------------------------------------------------
# Stop docker
# -------------------------------------------------------------------
service docker stop
# -------------------------------------------------------------------
# Uninstall docker.io (You may need to do 'aptitude search docker'
# to see if it is installed. If you do not have 'docker' installed,
# but 'lxc-docker', then remove that instead
# -------------------------------------------------------------------
apt-get remove docker.io
# -------------------------------------------------------------------
# Cleanup any remaining files you want from:
# /var/lib/docker
# /etc/init.d
# /etc/default/docker
# /var/log/docker*
# Your choice.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# Install AUFS support
# -------------------------------------------------------------------
apt-get update
apt-get install linux-image-extra-`uname -r`
# -------------------------------------------------------------------
# Fix keys
# -------------------------------------------------------------------
apt-get update
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# -------------------------------------------------------------------
# Update your apt sources
# Note: First check your /etc/apt/sources.list.d/docker.list to see
# if it already has this
# -------------------------------------------------------------------
sh -c "echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
# -------------------------------------------------------------------
# Install latest docker
# -------------------------------------------------------------------
apt-get update
apt-get install lxc-docker
# Note: During install, yo may get a message about
# /etc/init/docker.conf being present.
# If so, choose Y to overwrite your old one with the new one.
# -------------------------------------------------------------------
# Change /etc/default/docker:
# -------------------------------------------------------------------
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="-H tcp://0.0.0.0:2376 \
-H unix:///var/run/docker.sock \
--dns 10.0.0.1 \ <<- Your local DNS
--dns 10.0.0.2 \ <<- services
--insecure-registry 10.0.0.4:5000" <<- If you have a private repo
# -------------------------------------------------------------------
# Look at the upstart jobs:
# -------------------------------------------------------------------
service --status-all
[ + ] apparmor
[ ? ] console-setup
[ + ] cron
[ - ] docker
[ - ] grub-common
[ ? ] killprocs
[ ? ] kmod
[ ? ] networking
[ + ] ntp
[ ? ] ondemand
[ ? ] open-vm-tools
[ + ] postfix
[ - ] procps
[ + ] puppet
[ + ] rabbitmq-server
[ ? ] rc.local
[ + ] resolvconf
[ - ] rsync
[ + ] rsyslog
[ ? ] sendsigs
[ + ] snmpd
[ - ] ssh
[ - ] sudo
[ + ] udev
[ ? ] umountfs
[ ? ] umountnfs.sh
[ ? ] umountroot
[ - ] unattended-upgrades
[ - ] urandom
# -------------------------------------------------------------------
# Restart the service to enable AUFS support
# -------------------------------------------------------------------
service docker restart
# -------------------------------------------------------------------
# Get info
# -------------------------------------------------------------------
$ docker info
Containers: 0
Images: 0
Storage Driver: aufs <-- AUFS
Root Dir: /mnt/docker/aufs <-- AUFS
Backing Filesystem: extfs
Dirs: 0
Execution Driver: native-0.2
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04.1 LTS
CPUs: 16
Total Memory: 15.67 GiB
Name: dock-prod-001
ID: AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH:0000:1111:2222:3333
# Your ID will be different of course
# -------------------------------------------------------------------
# Start Seagull to have a pretty interface to containers
# See https://registry.hub.docker.com/u/tobegit3hub/seagull/
# -------------------------------------------------------------------
docker run -d \
-p 10086:10086 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name=Seagull \
tobegit3hub/seagull
# Browse via your desktop to http://10.0.0.3:10086/containers
# -------------------------------------------------------------------
# Install Elastic
# See https://registry.hub.docker.com/_/elasticsearch/
# The '_' in the URL means it's an official image
# -------------------------------------------------------------------
docker run -d \
-p 9200:9200 -p 9300:9300 \
-v /some/path/to/elastic_search_data:/data \
--name=Elastic \
elasticsearch \
elasticsearch -Des.config=/data/elasticsearch.yml
# Note: The first 'elasticsearch' is the image, and
# the second 'elasticsearch' is the command plus options
# Browse to http://10.0.0.3:9200 and http://10.0.0.3:9200/_search
# -------------------------------------------------------------------
# Install Redis
# See https://registry.hub.docker.com/u/library/redis/
# -------------------------------------------------------------------
docker run -d \
-p 6379:6379 \
-v /some/path/to/redis_data:/data \
--name=Redis \
redis redis-server \
--appendonly yes
# Note: The 'redis' is the image, and
# the 'redis-server' is the command plus any options
# -------------------------------------------------------------------
# Install redis command line tools
# So you can interact with the Redis container
# -------------------------------------------------------------------
apt-get update
apt-get install redis-tools
# -------------------------------------------------------------------
# Test
# -------------------------------------------------------------------
# First go to the redis_data folder which was defined via the start
$ cd redis_data
# Let's look at the data store
$ ls -l appendonly.aof
total 0
-rw-r--r-- 1 deploy docker 0 Mar 18 09:24 appendonly.aof
# Empty, so let's add a key
$ redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> set hello world
OK
127.0.0.1:6379> keys *
1) "hello"
127.0.0.1:6379> get hello
"world"
127.0.0.1:6379> quit
# Now let's look at it
$ ls -l appendonly.aof
total 4
-rw-r--r-- 1 deploy docker 58 Mar 18 09:33 appendonly.aof
# Ooo. Changed, so let's see if we can view that file
$ file appendonly.aof
appendonly.aof: ASCII text, with CRLF line terminators
# Yup. So let's look at it:
$ cat appendonly.aof
*2
$6
SELECT
$1
0
*3
$3
set
$5
hello
$5
world
# -------------------------------------------------------------------
# Look at the containers:
# -------------------------------------------------------------------
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c758b7dc90e5 redis:latest "/entrypoint.sh redi 4 minutes ago Up 4 minutes 0.0.0.0:6379->6379/tcp Redis
310ccb182746 elasticsearch:latest "elasticsearch -Des. 8 minutes ago Up 8 minutes 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp Elastic
e78470ddebca tobegit3hub/seagull:latest "./seagull" 30 minutes ago Up 30 minutes 0.0.0.0:10086->10086/tcp Seagull
# -------------------------------------------------------------------
# Start doing your own deployments!
# -------------------------------------------------------------------
</pre>Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-28053459796986684642015-03-12T23:55:00.002+10:002015-03-13T11:29:05.664+10:00Thank you Dr Mark Courtney and Dr Paul Murphy and all the staff at John Flynn HospitalOk. I survived my latest surgery. Many thanks to the staff of John Flynn Private Hospital and Dr Mark Courtney and Dr Mark Murphy for making it memorable.<br />
<br />
I say memorable in that my handbag and overnight bag got lost. I'm not complaining mind you.<br />
<br />
Seriously.<br />
<br />
6 hours of searching by security staff eventually found them. Keys, cards, prescriptions, etc basically 2/3rds of my life recovered. Thanks guys!<br />
<br />
In the mean time I had to wear paper clothing and be restricted to my room. Which was awesome I have to say. Fantastic views. But no underwear. Sucks to be me. Dr Courtney came round to see how I was faring at 7:30pm. Way, way, seriously way, after his visiting times.<br />
<br />
Now that's dedication to doing the right thing.<br />
<br />
Awesome!<br />
<br />
He was an angel and sent me home rather than stay overnight because:<br />
<br />
1) The cyst (huge bugger as it was) was easy to remove and<br />
2) I didn't bleed like a stuck pig and<br />
3) He understood I had to pay for the room out of my own pocket and<br />
4) ALIENS! No. Not really. Just people. Humans. Good humans.<br />
5) Now where did I put number 6?<br />
6) Oh! Here it is!<br />
<br />
I shook his hand warmly and gave him a hug. He positively beamed happiness.<br />
<br />
And a big shout-out to Dr Paul Murphy.<br />
We had met before and I kept calling him 'Paul'.<br />
Kinda odd in a professional kind of way.<br />
I kept expected him to say<br />
<br />
<blockquote class="tr_bq">
I didn't spend 3 years in "evil Anaesthesia College" to be called "Paul" thank you very much. It's Dr Murphy if you please.</blockquote>
Sorry about that.<br />
<br />
Oh. I have to mention. While in pre-op I overheard the birth of two babies. AWESOME. Made me smile. And many of the staff I have to say. Cool.<br />
<br />
I now have a HUGE plaster on my neck and my neck hurts like... Like... Buggery... But I have antibiotics, pan forte and FINALLY have this damn thing out of my neck. Two years of coughing myself to distraction every morning for 2 hours. Gone. Clicking when I swallow. Gone. Glands the size of golf balls. Gone. Finally. Gone.<br />
<br />
Thank you Dr Mark Courtney and Dr Mark Murphy and all the staff at John Flynn Hospital for making it go away. Thank you.<br />
<br />
And A massive shout out to security for ransacking every ward and every locker for my bags.<br />
<br />
Thank you.<br />
<br />
Dr Courtney.<br />
Dr Murphy.<br />
ALL THE STAFF AT JOHN FLYNN PRIVATE HOSPITAL!<br />
ALL OF YOU.<br />
SPECIAL SHOUT-OUT TO SECURITY - AWESOME JOB DUDES.<br />
<br />
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-85547339705918042392015-03-04T09:38:00.000+10:002015-03-04T09:59:23.666+10:00Docker: Find what the container port is from inside the container!Ok. Service registration and discovery inside a docker container can be fiddly sometimes.<br />
And I wanted to have dynamic port numbers when starting a container so I could 'register' the service in Redis.<br />
<br />
So how do you do it?<br />
<br />
I first fiddled with using <code>socat</code> inside the startup for the service which worked, but was ugly.<br />
<br />
FYI: I ran up a vagrant ubuntu VM and installed docker 1.5 to test this.<br />
<br />
So here's the way to do it in ruby.<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter"># ---------------------------------------------------------------------------
# Find out what our container port is
# ---------------------------------------------------------------------------
SVC_NAME = 'api-dummy_1'
require 'socket'
require 'net/http'
# Create the socket to the docker host
sock = Net::BufferedIO.new(UNIXSocket.new('/var/run/docker.sock'))
# Go grab all the containers details
request = Net::HTTP::Get.new('/containers/json')
request.exec(sock, '1.1', '/containers/json')
begin
response = Net::HTTPResponse.read_new(sock)
end while response.kind_of?(Net::HTTPContinue)
response.reading_body(sock, request.response_body_permitted?) { }
# Parse and loop over it trying to find our name
data = JSON.parse(response.body)
puts "Data received: #{data}"
data.each do |container|
puts "Looking at: #{container}"
if container['Names'].include? "/#{SVC_NAME}"
container_port = container['Ports'][0]['PublicPort']
puts "CONTAINER_PORT: #{container_port}"
ENV['SVC_PORT'] = container_port.to_s
break
end
end
</pre>
<br />
Obviously you'd have to do something to handle it if you can't find the name...<br />
And should really check the Ports array better.<br />
<br />
The socket call returns an array something like this:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">[
{
"Command":"/bin/sh -c 'bundle exec foreman start'",
"Created":1425423198,
"Id":"5b11471046a04b64fffc2866d4eb67568221fb8c3445a326557182208559e460",
"Image":"my_repo:5000/something/api-dummy_1:latest",
"Names":["/api-dummy_1"],
"Ports":[{"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":49172,"Type":"tcp"}],
"Status":"Up 1 seconds"
},
{
...another one...
}
]
</pre>
<br />
You have to map the <code>/var/run/docker.sock</code> on running the container of course.<br />
Something like this:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">#!/bin/bash
export SVC_NAME=api-dummy_1
export DOCKER_HOST=tcp://127.0.0.1:2378
export REPO=10.0.0.1 # Whatever
docker pull ${REPO}:5000/something/${SVC_NAME}
docker kill ${SVC_NAME}
docker rm ${SVC_NAME}
docker run -d --env RAILS_ENV=production \
--env HOST_IP=10.0.0.2 \
--env SVC_NAME=api-dummy_1 \
--env REDIS=10.0.0.3 \
--name ${SVC_NAME} \
-p :5000 \
-v /var/run/docker.sock:/var/run/docker.sock \
${REPO}:5000/something/${SVC_NAME}
</pre>
<br />
Names and IPs to be changed of course.<br />
<br />
Still fiddly, but it works.<br />
<br />
YMMV.<br />
<br />
<b>Update:</b><br />
<br />
I just realised that docker provides a <code>HOSTNAME</code> environment variable which is essentially the container id which would allow you to call <code>/containers/#{ENV['HOSTNAME']}/json</code> instead of doing the loop to get the configuration for that specific id.<br />
<br />
The configuration returned is slightly different. See <a href="https://docs.docker.com/reference/api/docker_remote_api_v1.15/#inspect-a-container" target="_blank">https://docs.docker.com/reference/api/docker_remote_api_v1.15/#inspect-a-container</a> for details<br />
<br />
Enjoy.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-66858063676394384482015-01-28T20:39:00.001+10:002015-01-28T20:39:49.036+10:00Diamonds For Nothing a parody for MinecraftersNow look at them diggy-diggies that's the way you do it<br />
You play the pick-axe on the MC-YT<br />
That ain't diggin' that's the way you do it<br />
Diamonds for nothin' and chickens for free<br />
Now that ain't diggin' that's the way you do it<br />
Lemme tell ya them miners ain't dumb<br />
Maybe get a arrow on your right arm<br />
Maybe get a arrow on the back of your head<br />
<br />
We gotta install these coal-powered ovens<br />
Custom jukebox deliveries<br />
We gotta move these iron bars<br />
We gotta move these chestie's<br />
<br />
See the little noob with the skin and the hat<br />
Yeah buddy that's his own hat<br />
That little miner got his own jet pack<br />
That little miner he's a millionaire<br />
<br />
We gotta install these coal-powered ovens<br />
Custom jukebox deliveries<br />
We gotta move these iron bars<br />
We gotta move these chestie's<br />
<br />
I shoulda learned to play the game<br />
I shoulda learned to play them picks<br />
Look at that miner, she got it stickin' in the camera<br />
Man we could have some fun<br />
And he's up there, what's that? Indie noises?<br />
Bangin' on the creepers like a simoneeze<br />
That ain't workin' that's the way you do it<br />
Diamonds for nothin' and chickens for free<br />
<br />
We gotta install these coal-powered ovens<br />
Custom jukebox deliveries<br />
We gotta move these iron bars<br />
We gotta move these chestie's<br />
<br />
Now that ain't diggin' that's the way you do it<br />
You play the pick on the MC-YT<br />
That ain't diggin' that's the way you do it<br />
Diamonds for nothin' and chickens for free<br />
Diamonds for nothin' and chickens for free<br />
<br />
I want my<br />
I want my<br />
I want my MC-YT!Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-66881858192480359922015-01-08T22:17:00.000+10:002015-01-08T22:18:49.115+10:00Docker: Creating ruby 2.2.0, mysql and rails imagesFor the purposes of this post, I'm assuming you have a private repository with the address <code>10.0.0.1:5000</code>.<br />
<br />
In this example, you will notice a distinct similarity in the build scripts.<br />
Hmm.<br />
Funny that.<br />
I created a tool <code>sleet</code> which is like <code>fleet</code> but for single server installs.<br />
So that is the essence of those build scripts.<br />
If I have time somewhere in my aging schedule and downright ludicrous deadlines, I'll open source it.<br />
<br />
This creates 4 images in your private repo.<br />
<br />
- <code>debian</code> which is an instance of jessie with various compilers etc installed.<br />
- <code>ruby-2.2.0</code> compiled from source<br />
- <code>mysql-ruby-2.2.0</code> with the build dependencies<br />
- <code>rails-2.2.0</code> from all of the above<br />
<br />
The purpose was to get an image that can be used for `rails-api` micro services that builds and deploys ultra-fast.<br />
This is done by pre-installing the most commonly used gems into the `rails-2.2.0` image.<br />
<br />
Then when a build is done that inherits from the `rails-2.2.0` image, the `bundle install` simply uses the local gems and doesn't have to go off to any external gem sources.<br />
The bundle output shows `Using` instead of `Installing` the latter of which involves snarfing gems off the web and purhaps compiling things.<br />
<br />
<br />
First up, here's the tree you'll be creating:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">.
├── debian
│ └── jessie
│ ├── Dockerfile
│ └── build.sh
├── mysql
│ └── 2.2.0
│ ├── Dockerfile
│ └── build.sh
├── rails
│ └── 2.2.0
│ ├── Dockerfile
│ ├── build
│ │ └── Gemfile
│ └── build.sh
└── ruby
└── 2.2.0
├── Dockerfile
└── build.sh
</pre>
<br />
Here are the files:<br />
<br />
<code>debian/jessie/Dockerfile</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">FROM debian:jessie
MAINTAINER Your Name <your .name="" you.com.au="">
ENV REFRESHED_AT 2015-01-08
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git curl procps \
autoconf build-essential \
libbz2-dev libcurl4-openssl-dev libffi-dev libssl-dev libreadline-dev libyaml-dev \
zlib1g-dev --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
</your></pre>
<br />
<code>debian/jessie/build.sh</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">#!/bin/sh
IMAGE=debian
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=${HOME}/.boot2docker/certs/boot2docker-vm
IMAGE_REPO=10.0.0.1:5000
echo "------------------------------------------------------------------------"
echo " ENVIRONMENT"
echo " DOCKER_HOST ${DOCKER_HOST}"
echo " IMAGE ${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " ENVIRONMENT"
echo " DOCKER_HOST ${DOCKER_HOST}"
echo " IMAGE ${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " DELETING OLD IMAGES"
docker rmi ${IMAGE_REPO}/images/${IMAGE} ${IMAGE}
echo "========================================================================"
echo ""
set -e
echo "------------------------------------------------------------------------"
echo "BUILD"
docker build -t="${IMAGE}" .
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "IMAGES"
docker images | egrep "^${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "HISTORY"
docker history ${IMAGE}
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " TAG AND PUSH"
docker images | grep "^${IMAGE}"
sha=`docker images | grep "^${IMAGE}" | awk '{ print $3; }' | cut -f1`
echo "sha=${sha}"
docker tag ${sha} ${IMAGE_REPO}/images/${IMAGE}
docker push ${IMAGE_REPO}/images/${IMAGE}
echo "========================================================================"
echo ""
</pre>
<br />
<code>ruby/2.2.0/Dockerfile</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">FROM 10.0.0.1:5000/images/debian
MAINTAINER Your Name <your .name="" you.com.au="">
ENV REFRESHED_AT 2015-01-08
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.0
RUN apt-get update \
&& apt-get install -y bison ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" | tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& apt-get purge -y --auto-remove bison ruby \
&& make install \
&& rm -r /usr/src/ruby
# skip installing gem documentation
RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
# don't create ".bundle" in all our apps
ENV BUNDLE_APP_CONFIG $GEM_HOME
CMD [ "irb" ]
</your></pre>
<br />
<code>ruby/2.2.0/build.sh</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">#!/bin/bash
IMAGE=ruby-2.2.0
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=${HOME}/.boot2docker/certs/boot2docker-vm
IMAGE_REPO=10.0.0.1:5000
echo "------------------------------------------------------------------------"
echo " ENVIRONMENT"
echo " DOCKER_HOST ${DOCKER_HOST}"
echo " IMAGE ${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " DELETING OLD IMAGES"
docker rmi ${IMAGE_REPO}/images/${IMAGE} ${IMAGE}
echo "========================================================================"
echo ""
set -e
echo "------------------------------------------------------------------------"
echo " BUILD"
docker build -t="${IMAGE}" .
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "IMAGES"
docker images | egrep "^${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "HISTORY"
docker history ${IMAGE}
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " TAG AND PUSH"
docker images | grep "^${IMAGE}"
sha=`docker images | grep "^${IMAGE}" | awk '{ print $3; }' | cut -f1`
echo "sha=${sha}"
docker tag ${sha} ${IMAGE_REPO}/images/${IMAGE}
docker push ${IMAGE_REPO}/images/${IMAGE}
echo "========================================================================"
echo ""
</pre>
<br />
<code>mysql/2.2.0/Dockerfile</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">FROM 10.0.0.1:5000/images/ruby-2.2.0
MAINTAINER Your Name <your .name="" you.com.au="">
ENV REFRESHED_AT 2015-01-08
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.0
RUN buildDeps='libmysqlclient-dev'; \
set -x \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends
CMD [ "irb" ]
</your></pre>
<br />
<code>mysql/2.2.0/build.sh</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">#!/bin/bash
IMAGE=ruby-2.2.0
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=${HOME}/.boot2docker/certs/boot2docker-vm
IMAGE_REPO=10.0.0.1:5000
echo "------------------------------------------------------------------------"
echo " ENVIRONMENT"
echo " DOCKER_HOST ${DOCKER_HOST}"
echo " IMAGE ${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " DELETING OLD IMAGES"
docker rmi ${IMAGE_REPO}/images/${IMAGE} ${IMAGE}
echo "========================================================================"
echo ""
set -e
echo "------------------------------------------------------------------------"
echo " BUILD"
docker build -t="${IMAGE}" .
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "IMAGES"
docker images | egrep "^${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "HISTORY"
docker history ${IMAGE}
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " TAG AND PUSH"
docker images | grep "^${IMAGE}"
sha=`docker images | grep "^${IMAGE}" | awk '{ print $3; }' | cut -f1`
echo "sha=${sha}"
docker tag ${sha} ${IMAGE_REPO}/images/${IMAGE}
docker push ${IMAGE_REPO}/images/${IMAGE}
echo "========================================================================"
echo ""
</pre>
<br />
<code>rails/2.2.0/Dockerfile</code><br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">FROM 10.0.0.1:5000/images/debian-mysql-ruby-2.2.0
MAINTAINER Your Name <your .name="" you.com.au="">
ENV REFRESHED_AT 2015-01-08
ENV HOME /build
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.0
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
ADD ./build /build
WORKDIR /build
RUN bundle install --jobs 8
CMD [ "irb" ]
<pre><code>rails/2.2.0/build/Gemfile</code>
<pre class="brush: ruby;" type="syntaxhighlighter">source 'http://your.private.gem.server:9900'
# ---------------------------------------------------------------------------
# Always these
# ---------------------------------------------------------------------------
gem 'rails', '4.2.0'
gem 'mysql2'
gem 'thin'
gem 'foreman'
gem 'jsonapi-resources' # and/or roar
gem 'db_populate', git: 'https://github.com/ffmike/db-populate.git'
gem 'rack-cors'
gem 'activeresource'
gem 'jbuilder', '~> 2.0'
gem 'typhoeus'
gem 'etcd'
gem 'hutch'
gem 'elasticsearch'
gem 'searchkick'
gem 'therubyracer'
gem 'oj'
# ---------------------------------------------------------------------------
# Unused
# ---------------------------------------------------------------------------
# gem 'jquery-rails'
# gem 'turbolinks'
# gem 'bcrypt', '~> 3.1.7' # Use ActiveModel has_secure_password
# gem 'sass-rails', '~> 4.0.3'
# gem 'uglifier', '>= 1.3.0'
# gem 'coffee-rails', '~> 4.0.0'
</pre>
<code>rails/2.2.0/build.sh</code>
<pre class="brush: ruby;" type="syntaxhighlighter">#!/bin/bash
IMAGE=rails-2.2.0
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_TLS_VERIFY=1
export DOCKER_CERT_PATH=${HOME}/.boot2docker/certs/boot2docker-vm
IMAGE_REPO=10.0.0.1:5000
echo "------------------------------------------------------------------------"
echo " ENVIRONMENT"
echo " DOCKER_HOST ${DOCKER_HOST}"
echo " IMAGE ${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " DELETING OLD IMAGES"
docker rmi ${IMAGE_REPO}/images/${IMAGE} ${IMAGE}
echo "========================================================================"
echo ""
set -e
echo "------------------------------------------------------------------------"
echo " BUILD"
docker build -t="${IMAGE}" .
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "IMAGES"
docker images | egrep "^${IMAGE}"
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo "HISTORY"
docker history ${IMAGE}
echo "========================================================================"
echo ""
echo "------------------------------------------------------------------------"
echo " TAG AND PUSH"
docker images | grep "^${IMAGE}"
sha=`docker images | grep "^${IMAGE}" | awk '{ print $3; }' | cut -f1`
echo "sha=${sha}"
docker tag ${sha} ${IMAGE_REPO}/images/${IMAGE}
docker push ${IMAGE_REPO}/images/${IMAGE}
echo "========================================================================"
echo ""
</pre>
Enjoy.
YMMV.
</pre>
</your></pre>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-18833725226175315652015-01-08T22:09:00.001+10:002015-01-08T22:09:25.843+10:00Docker: Run/Administer an instance of elasticsearch on your boot2docker vmFirst ssh into your boot2docker vm, then run these commands:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">docker pull dockerfile/elasticsearch
mkdir elastic_search
cat > elastic_search/elasticsearch.yml <<-EOF
path:
logs: /data/log
data: /data/data
http.cors.enabled: true
EOF
docker run -d -p 9200:9200 -p 9300:9300 \
-v ${HOME}/elastic_search:/data \
--name ElasticSearch \
dockerfile/elasticsearch \
/elasticsearch/bin/elasticsearch \
-Des.config=/data/elasticsearch.yml
docker@boot2docker:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[whatever] dockerfile/elasticsearch:latest "/elasticsearch/bin/ 24 seconds ago Up 23 seconds 0.0.0.0:9200->9200/tcp,0.0.0.0:9300->9300/tcp ElasticSearch</pre>
<pre class="brush: ruby;" type="syntaxhighlighter">
</pre>
Now from your Mac browse to <code>http://192.168.59.103:9200</code> and you should get a status result.<br />
<br />
Now run elasticsearch-head on your Mac (not the vm):<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">cd /some/tools/folder/of/your/choice
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
grunt server
</pre>
<br />
Now browse to <code>http://localhost:9100</code> and:<br />
1) set the connect box to <code>http://192.168.59.103:9200</code> and<br />
2) click connect<br />
<br />
You now have ES running on your boot2docker instance and can access it from your Mac.<br />
<div>
<br /></div>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-80756992942039776592015-01-08T22:02:00.002+10:002015-01-08T22:02:50.307+10:00Docker: Private Registry push yields "Error: Invalid registry endpoint" and "insecure-registry"For some time I've been using boot2docker on my mac.<br />
This was version 1.3.1.<br />
I also have a private registry which for the purposes of this post I've called 10.0.0.1:5000.<br />
<br />
Some time ago I accidently brew updated and got docker 1.4.1.<br />
So I couldn't access the running boot2docker daemon.<br />
For some reason that seemed quite reasonable at the time, I didn't restart the boot2docker vm.<br />
Go figure.<br />
<br />
So I had to do this kind of thing:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">(
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=${HOME}/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
/usr/local/Cellar/docker/1.3.2/bin/docker push 10.0.0.1:5000/some_image
)
</pre>
<br />
Then today I accidently started Kitematic.<br />
Which upgraded the boot2docker vm and restarted it.<br />
And blammo I could no longer push to the private repository.<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">FATAL[0002] Error: Invalid registry endpoint https://10.0.0.1:5000/v1/: \
Get https://10.0.0.1:5000/v1/_ping: EOF. \
If this private registry supports only HTTP or HTTPS with an unknown CA certificate, \
please add `--insecure-registry 10.0.0.1:5000` to the daemon's arguments. \
In the case of HTTPS, if you have access to the registry's CA certificate, \
no need for the flag; simply place the CA certificate at \
/etc/docker/certs.d/10.0.0.1:5000/ca.crt
</pre>
<br />
Bugger.<br />
Dope slap.<br />
Noob.<br />
<br />
So the fix is:<br />
<br />
1) ssh into your boot2docker vm and<br />
2) sudo vi /var/lib/boot2docker/profile and<br />
3) Add 'EXTRA_ARGS="--insecure-registry 10.0.0.1:5000"' to it, :wq and<br />
4) sudo /etc/init.d/docker restart<br />
5) And just use the /usr/local/bin/docker and not the Cellar version.<br />
<br />
YMMV.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-54590987203543519482015-01-08T22:01:00.000+10:002015-01-08T22:01:00.632+10:00Docker: Delete "dangling" imagesAfter using docker for a while one notices a distinct slow down in performance of your host.<br />
<br />
Some digging revealed that "dangling" images are the culprit.<br />
<br />
While being a little simplistic, these are images that are no longer associated with any running container.<br />
<br />
I dare you to go onto your docker host (even boot2docker) and do this:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">docker images -q --filter "dangling=true"
</pre>
<br />
My guess is that you'll see hundreds (or thousands if you've been busy) of those.<br />
<br />
Here's the trick to getting rid of those large incontinent beasts that are leaving great piles of steaming images in your host:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">docker images -q --filter "dangling=true" | xargs docker rmi
</pre>
<br />
You may see a few false positives, but "hey!" at least the trash has been taken out.<br />
<br />
Might be worth cronning it...<br />
<br />
YMMV.Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-90578399328913634922015-01-08T21:54:00.001+10:002015-01-08T22:20:02.759+10:00Get next free port on Linux with RubyGet next free port:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">require 'socket'
(1..10).each do |n|
socket = Socket.new(:INET, :STREAM, 0)
socket.bind(Addrinfo.tcp("127.0.0.1", 0))
port = socket.local_address.ip_port
puts "port -> #{port}"
socket.close
end
</pre>
<br />
command line:<br />
<br />
<pre class="brush: ruby;" type="syntaxhighlighter">port=$(ruby -e "require 'socket'; \
s = Socket.new(:INET, :STREAM, 0); \
s.bind(Addrinfo.tcp('127.0.0.1', 0)); \
port = s.local_address.ip_port; \
s.close; \
p port")
</pre>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-86570303497473417802014-12-28T13:15:00.001+10:002014-12-28T13:15:43.609+10:00A very Diggy Diggy Minecraft and Gaming Christmas!Well.<br />
Not just MineCraft.<br />
Here's some photos:<br />
<br />
Our decorations include Minecraft items!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9ztMtyi-UyOhVA-G7w66rKUDYiln5Uln7NviBACdwYpKxsOkMeUXSDjJMMNlTqxWEEl4Z-DRSXprHhuInOLOksEhlSTESUswAqvzMNc_zCAPZStyC5Sjz4mFcX6znBHj0t6CQWePgkfCh/s1600/ChrissieTree2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9ztMtyi-UyOhVA-G7w66rKUDYiln5Uln7NviBACdwYpKxsOkMeUXSDjJMMNlTqxWEEl4Z-DRSXprHhuInOLOksEhlSTESUswAqvzMNc_zCAPZStyC5Sjz4mFcX6znBHj0t6CQWePgkfCh/s1600/ChrissieTree2.jpg" height="320" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
And Daleks and K9 and some paper figures of us:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeaUdgRWfs9T-wh4n05LO3TJnFo0npGaYwxPtZIkE04qDxfi8iEAtEwW6RGNu3RHbwhIPe0RkuYpqASlOk-nLWrnwZO0XuhkXeYvcZ0qjW_QvpJFwFLZEFkxFa6t6bJALgcRKOVBQEoxau/s1600/ChrissieTree.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeaUdgRWfs9T-wh4n05LO3TJnFo0npGaYwxPtZIkE04qDxfi8iEAtEwW6RGNu3RHbwhIPe0RkuYpqASlOk-nLWrnwZO0XuhkXeYvcZ0qjW_QvpJFwFLZEFkxFa6t6bJALgcRKOVBQEoxau/s1600/ChrissieTree.jpg" height="320" width="240" /> </a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Ben got a metal Millenium Falcon to make. Warning: You will need snippers, a tweezer and the eyesight of an eagle.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR6-QrCrad7uy5jdpkM7wl9cqhIludMrfKNffMNlKfnhQTv95YI2aWmUTh_IJRQW8pMQakF24APugsflQWMU3STSakr9XTg0zS1SM9ObjzOHasPQm5ERWZJnHuXUKO7TgnsOCnZSBTmm6I/s1600/MilleniumFalcon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR6-QrCrad7uy5jdpkM7wl9cqhIludMrfKNffMNlKfnhQTv95YI2aWmUTh_IJRQW8pMQakF24APugsflQWMU3STSakr9XTg0zS1SM9ObjzOHasPQm5ERWZJnHuXUKO7TgnsOCnZSBTmm6I/s1600/MilleniumFalcon.jpg" height="240" width="320" /></a></div>
<br />
He got me a Minecraft GiftPack of books.<br />
Aimed at kids, but really cool.<br />
I particularly liked that on page 2 of every book is a page about staying safe online.<br />
Sigh. Vanilla Minecraft. Awesome.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfXea7QoBvmq5z8FUkoUQFiGP0Gtj0HUBxYUaNGGRf1CPBev_7MuWENgXkYfDbLpLpAnwVYNP402BDuKiEbirzeMbSQtDNbTD1tNIkzJUfFu1Mhm2dQmw8CqkpNgurW4077NBSidKh_aH6/s1600/MinecraftBooks.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfXea7QoBvmq5z8FUkoUQFiGP0Gtj0HUBxYUaNGGRf1CPBev_7MuWENgXkYfDbLpLpAnwVYNP402BDuKiEbirzeMbSQtDNbTD1tNIkzJUfFu1Mhm2dQmw8CqkpNgurW4077NBSidKh_aH6/s1600/MinecraftBooks.jpg" height="320" width="240" /></a></div>
<br />
Also some Minecraft paper figurines.<br />
(The video is Wil Wheaton and others playing Ticket to Ride)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIPruy8PyXO_Y9Ff_TIpv-JGBBjL7acQw8Af5976SOGwmsS8eCXOXRBs9RJ705uGfEf8jBxBlDShGp2vXpH_3YxBij_pDBTC9WO6ev6YVzHLA7R1Sn818mJHZIwXnsxlIMu_uJ7oJDQCuq/s1600/PaperMinecraft.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIPruy8PyXO_Y9Ff_TIpv-JGBBjL7acQw8Af5976SOGwmsS8eCXOXRBs9RJ705uGfEf8jBxBlDShGp2vXpH_3YxBij_pDBTC9WO6ev6YVzHLA7R1Sn818mJHZIwXnsxlIMu_uJ7oJDQCuq/s1600/PaperMinecraft.jpg" height="240" width="320" /></a></div>
<br />
I got him a baby StrandBeest!<br />
It really works and walks and creeps you out with its organic look when it's moving.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJk1Jy1HxjudZu8dnIG6niIbQ4uRbl7tU-gd8ByhZBKhu71zkPpgsaVeqzDm8CHnuOM0rB6RCoJ8DwltvKWAQYsYqzB3PW5o3J_PPqultjzc9N6KEqCGL01sc9no5xYUjHJQnU9MJHxP5-/s1600/StrandBeest.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJk1Jy1HxjudZu8dnIG6niIbQ4uRbl7tU-gd8ByhZBKhu71zkPpgsaVeqzDm8CHnuOM0rB6RCoJ8DwltvKWAQYsYqzB3PW5o3J_PPqultjzc9N6KEqCGL01sc9no5xYUjHJQnU9MJHxP5-/s1600/StrandBeest.jpg" height="240" width="320" /></a></div>
<br />
And would you believe it, we bought each other a copy of the KJV Manga Bible!<br />
See Moses using his Ninja Skills!<br />
Curiously the one on the left covers the whole old testament in great detail while the one on the right skips most of it to concentrate on the new testament.<br />
Both leave out a shed load of books from both testaments, but they are both very cool.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwjT08T1F4p0G-BN0Q8naAxxeTmhqOhqa05KHMlNDMY60ORahZiO1zod3UNKdYt3SpT-giv0whwgqnh0v9Frjc2fc5WhE0iD8Liql6BOkn62iQv5Ih7uwEZWy8hEPg1A2b_tR6-CgeipfF/s1600/TheMangaBible.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwjT08T1F4p0G-BN0Q8naAxxeTmhqOhqa05KHMlNDMY60ORahZiO1zod3UNKdYt3SpT-giv0whwgqnh0v9Frjc2fc5WhE0iD8Liql6BOkn62iQv5Ih7uwEZWy8hEPg1A2b_tR6-CgeipfF/s1600/TheMangaBible.jpg" height="240" width="320" /></a></div>
<br />
Oh. And here's Ticket to Ride!<br />
We played it straight away and love it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCTC4k5hAfx4Gxqzha41UsyF2qmmYa7gbuimNzE0280x7d06pLTrNQgPPoRLRI8E6m23HMy7ez-_ll5JEbj_oa5Xv_TZNm2AYIWYp2o1aFqO0upNXGQn1sYQS_ZGMAuiKVdVMxctJCaVK5/s1600/TicketToRide.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCTC4k5hAfx4Gxqzha41UsyF2qmmYa7gbuimNzE0280x7d06pLTrNQgPPoRLRI8E6m23HMy7ez-_ll5JEbj_oa5Xv_TZNm2AYIWYp2o1aFqO0upNXGQn1sYQS_ZGMAuiKVdVMxctJCaVK5/s1600/TicketToRide.jpg" height="240" width="320" /></a></div>
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-91036005758840322402014-12-08T17:03:00.002+10:002014-12-08T17:03:59.893+10:00"Minecraft Colada" Parody of Escape (The Piña Colada Song)"<div class="p1">
I was gaming with my lady, been on our console too long.</div>
<div class="p1">
Replaying all those old missions, felt just like donkey kong</div>
<div class="p1">
So while she installed some patches, I browsed a forum instead</div>
<div class="p1">
And in a thread about questing, there was this post that I read...</div>
<div class="p2">
<br /></div>
<div class="p1">
[chorus]</div>
<div class="p1">
If you like mining for diamonds and hunting sheep in the rain</div>
<div class="p1">
If you'll forge your own armour and you'll eat zombie brains</div>
<div class="p1">
If you kill endermen at midnight... and you wear a cool cape</div>
<div class="p1">
I've the game that you've looked for... play minecraft and escape</div>
<div class="p2">
<br /></div>
<div class="p1">
I didn't show it my lady, I know that sounds kind of mean...</div>
<div class="p1">
But she seemed happy with the console, I didn't want to break up her routine</div>
<div class="p1">
And so i logged into the forum, and hit reply on the post.</div>
<div class="p1">
I wanted to try this new game, was even willing to host.</div>
<div class="p2">
<br /></div>
<div class="p1">
[chorus]</div>
<div class="p1">
Yes I like mining or diamonds, and hunting sheep in the rain</div>
<div class="p1">
Zombies, skelons, and spiders... all of these will be slain</div>
<div class="p1">
I've got to log in by tomorrow night, for a gaming escape</div>
<div class="p1">
We'll use a mod pack from yogscast, while it's still up to date.</div>
<div class="p2">
<br /></div>
<div class="p1">
And so I spawned on the server, and started punching a tree</div>
<div class="p1">
I saw my new gaming partner... as she killed squids in the sea</div>
<div class="p1">
It was my own gaming lady and she said, "Aw, it's you."</div>
<div class="p1">
Then as she put down a workbench, she said "I never knew."</div>
<div class="p2">
<br /></div>
<div class="p1">
[chorus]</div>
<div class="p1">
That you like mining for diamonds and hunting sheep in the rain</div>
<div class="p1">
And the crafting of armour, and the farming of grains.</div>
<div class="p1">
if you kill endermen at midnight... and you wear a cool cape</div>
<div class="p1">
Your the player I've looked for... play with me and escape</div>
<div class="p2">
<br /></div>
<div class="p2">
[chorus]</div>
<div class="p1">
If you like mining for diamonds and hunting sheep in the rain</div>
<div class="p1">
If you'll forge your own armour and you'll eat zombie brains</div>
<div class="p1">
if you kill endermen at midnight... and you wear a cool cape</div>
<div class="p1">
I've the game that you've looked for... play minecraft and escape</div>
<div class="p2">
<br /></div>
<div class="p1">
[chorus]</div>
<div class="p1">
Yes I like mining or diamonds, and hunting sheep in the rain</div>
<div class="p1">
Zombies, skelons, and spiders... all of these will be slain</div>
<div class="p1">
I've got to log in by tomorrow night, for a gaming escape</div>
<br />
<div class="p1">
...</div>
Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-39229809304963544702014-10-21T22:07:00.001+10:002014-10-21T22:07:14.462+10:00Minecraft Yogscast Complete Pack - How to make BRONZE!Annoying as buggery.<br />
Want to play with BEES!<br />
But you need bronze.<br />
And wouldn't you know it if you pop 3 copper ingots around a tin ingot in a crafting bench as described in the wiki it does nothing.<br />
Nada.<br />
Nil.<br />
Zip.<br />
I thought it might be that the ingots were Mekanism, but I tried others.<br />
<br />
So here's the trick.<br />
<br />
1) Get a stack of ingots and go to your crusher.<br />
2) Crush them to dust.<br />
3) Go to your metallurgic infuser.<br />
4) Pop the dust in the left hand "power" bar (purple box).<br />
(If you have redstone or coal in it, click the 'dump' button')<br />
5) Pop your stack of copper ingots in the input (red box).<br />
6) Out come bronze ingots.<br />
<br />
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0tag:blogger.com,1999:blog-4182029374354793785.post-39059544875331681362014-10-16T23:30:00.003+10:002014-10-16T23:30:26.301+10:00MicroServices explained in a visual medium: MineCraft!I got sick of the endless power point and slide share presentations of what MicroServices are so I created a MineCraft version:<br />
<br />
<a href="https://www.youtube.com/playlist?list=PLN2jfHfKDn4eQ1B1O_gazraS53i77puGn" target="_blank">https://www.youtube.com/playlist?list=PLN2jfHfKDn4eQ1B1O_gazraS53i77puGn</a><br />
<br />
<br />Kimbohttp://www.blogger.com/profile/05655458897921054707noreply@blogger.com0