text:
Hello...is this thing on?
This is Gareth (TheStub) just getting settled in for a night of hockey from the Big Blue Tent.
Some of my texters have already started arriving.
Apparently we almost had an earlier start to the action tonight, with the warm-up almost kicking off.
Shaz at the rink
McMorrow is shouting his mouth off and having a go at Franny and then Voth, ref came and had words with McMorrow
Comments, predictions, general moaning - get me at email@example.com
Important Devils news - Lucy Fur is back!!
sounds good - let mcSORROW do whatever he likes.
Terry continues his excellent coverage at Wales Online. I find that following MNL and Terry at the same time can cover most the game. Plus, you get Terry's wonderful insights!
Both teams are out.
Devils are without Smith again. Hopefully this will be the last game he is out.
So, Matt Towe (sponsored by The Inferno) will be taking his spot on the top line. He hasn't looked out of place!
Sean is just doing his job guys. He's a top enforcer who wants to fight every game, you can't knock him for that.. He's just a tougher version of Rushton only Sean's a nice guy off the ice... :)
Agreed mate - and this 'love' is all part of it. Adds something to it all.
And we have started
McMorrow is on for his first shift.
Jarvis checks a player...and the ref!
Sounds like McMorrow tried to kill Adams. Helmet off - looked like a elbow to the head.
Adams got straight back up.
Giants penalty.
McMorrow 2+10 for Checking to the head @2:00.
Good start then...
Thomson has the whistle.
Devils just can't get setup in the Giants zone.
Romfo wrist shot from the blue line, Murphy saves.
I'll to try and be less impartial tonight than the Giants webcast guys - but I get too over the top, let me know ;)
Back to 5 on 5.
Powerplay wasn't very strong apparently. Giants easily clearing.
Whistle for man in crease @ 4:49
Murphy down in the crease, but the puck is deflected just over the net.
Lots of off puck digs, especially from Benedict.
Murphy really messed up. Was a weak shot which Murphy let rebound and Miller tapped in
Devils 1st goal Miller from Hartwick and Max @ 6:35.
Some of my texters are having problems with mobile networks. So my updates are being a bit 'sporadic'
Devils turn over the puck, Miller with a breakaway, but Murphy saves.
Too many Ms there ;)
Hill nails a Giant Philips. He rolls around like he has been shot, and then gets up when the whistle has blown.
Devils penalty. Michel 2 minutes Kneeing @ 10:36
Michel misses check, Giants player slips and Michel gets called
Giants setup in the Devils zone. Passing well.
Devils clear
Latulippe and Faubert have words as they skate off for a line change.
I'm with you PJT
Let's hope the Devils just concentrate on playing the game tonight - been far too much attention/talk regarding McMorrow recently. Let's just finish our checks, play smart & hurt the Giants on the scoreboard.
Giants back to full strength.
Faubert tries to nail Latulippe on whistle and misses
19 seconds and the first break in play and McMorrow will be back.
And he is back
Devils pen. Adams 2 minutes elbows @ 14:06
We need to stop giving up penalties. The amount of PK time we have is a major problem.
Giants looking very good on the power play - passing the puck very well.
Giants pen. Walsh 2 minutes for hooking.
Goal mouth scramble with Murphy flopping about, but Devils can't get it in.
Hartwick slaps it in from blue line, Murphy gloves it.
Devils back to full strength. Shot from faceoff with save.
Giants having now problems clearing the zone...what are you playing at Devils? You are on the PP!
Giants offside on 2 on 1 breakaway @ 17:20.
I'm with you Keith
Hello from Aberystwyth lets have a 2 points tonights please
Belfast full strength.
Devils get icing waved off, but Giants clear.
Belfast icing.
Last minute.
End of 1st.
Devils 1 - 0 Giants.
Apparently we didn't see McMorrow get a single shift after he came out of the box.
From sami at the rink
Giants started looking better 5 on 5 and were better on the power play. After first 5 minutes Devils were better 5 on 5, but shoot into players legs or hold puck too long and loose it
No change there then. My big gripes this year so far - our passing is sloppy, and we seem to overplay.
What you guys thinking? email@example.com
Shots on goal
Giants 12
Devils 6
Thanks Gareth
Hi there - great service as usual. We just have to stop taking stupid penalties & play steady, attacking hockey & the goals will come - I HOPE!
Just realised I got the SOG wrong lol. Missed a 1.
Should be Devils 16
I'll blame my keyboard.
Both teams back out, and we are underway.
Devils breakaway saved.
McMorrow has his 2nd shift of the game.
McMorrow shoots...Lyle saves.
McMorrow completes his shift with no penalties or incident.
Belfast offside.
Belfast icing.
Giants icing at 23:49
From sami
Kicking off, A Giant fell on top of a Devil and have him a few hits but was also waving his stick and hit another Devil in the mouth. No pens
Davies beats three players along the boards, tries to bank it in off Murphy from behind the goal, but it doesn't work.
Another goal mouth scramble, but Giants clear it.
McMorrow out for another shift...which coincides with Voth.
Nothing came of the two big guys this time.
Michel circles round the whole zone then wrists it top corner from the blue line
Devils 2nd goal Michel from Davies @ 28:18
Giants goal
Giants 1st goal scored by Shields assist Thornton @ 28:54
Devils having some good sustained pressure
Giants clear, but Devils regroup.
Davies just fails to make a back post tap in.
McMorrow is having a fair few shifts. Perhaps Thornton is happy he wont start.
Anyone out there, or have you all left me for Terry? hehe firstname.lastname@example.com
Devils icing
7:43 left
Giants offside @32:34
Devils offside 32:00
Try typing too Keith
no im still here, eating sunday dinner with the laptop on the table come on red army
Apparently Jono and Knight dropped the gloves in the Hull Steelers game - result was a draw.
Voth checks a Giants player. McMorrow comes rushing over like he was going to fight, and ends up complaining to the ref instead
Devils penalty. Richardson 2 minutes hooking @ 33:34
Lyle makes a good leg save on a slap shot from the point through traffic.
Devils back to full strength.
Giants icing @ 35:58
Devils icing 34:13
Max breakaway but puck bobbled, and he looses it.
Hill has a chance, but puts it wide.
Hartwick with a backpost tap in
Devils 3rd goal scored by Hartwick, from Hill and Michel @ 37:10
Devils penalty. Romfo 2 minutes tripping. @37:38
Giants powerplay goal
Giants goal. Nice passing around the zone on powerplay. They've been doing it all game on powerplay, so Devils need to stop taking penalties
Giants 2nd goal - 5 from 8 and 9 @38:17
Final minute of sencond
McMorrow give the Devils fans a wave, who keep making donkey noises at him.
Giants offside 39:57
End of second.
Devils 3 - 2 Giants
sami in the tent
Linesmen aren't great tonight. They're calling offsides correctly but keep being really late
I thought we may see McMorrow try and get Voth to step up when they went 2 behind - get his team in it.
I've seen a few interviews with the guy, and he seems to be decent. The sort of character that people in this league love. Either if that is love their enforcer, or love to hate. Takes it with good humour, and makes it entertaining.
What does everyone else think? McMorrow have a future? Can Devils hold this lead and take 2 point from the weekend? email@example.com
Right, cider and maybe some toast.
From Gareth Jenkins
IF we can keep 5 men on the ice for the next period I think we will win ! NO SILLY PENALTIES !
That has been the key for us for a few seasons. We take far too many stupid penalties.
Shots on goal (double checked this time)
Giants had 12
Devils had 9
A common theme from PJT
Would feel a lot better with more than a one goal lead, then again it's better than being behind!
I think we can do it as long as we don't give them too many opportunities on the PP.
Lets not give the Giants a chance 5 on 4!! We need to play our game, not serve bad penalties.
Devils better in the second. Need to avoid giving Giants power play time
And we are into the third.
Giants icing @41:32
Pile in Devils crease after McMorrow shot. Few handbags, but nothing called.
Giants ice @ 42:26
Sounds like we are having a bit of pressure. C'mon Devils lol
Lyle covers up at 43:33
Giants icing @ 43:49
Devils icing @ 46:11
Giants sound like they are pushing hard now.
Giants goal
Giants player picked up a rebound. Looks like it was kicked. Ref talking to linesman
Keith - I can't post that lol
Goal has been awarded.
Giants 3rd goal was Bateman from Cheverie Faubert @ 45:35.
Voth didn't look happy with the call. Should have sent it up to Toronto...oh hang on, what league is this?
Giants icing @ 47:02
blast then
Lots of off the puck handbags going on now.
The time of the goal was correct.
Devils penalty. Stone 2 minutes holding 48:08
Lyle with wicked save. One timer across goal and he slides across to make pad save.
Puck out of play @ 49:01
McMorrow is on the powerplay. Apparently that is how Thornton has been using him.
Suppose a big guy to stick in the crease is a good tool.
Devils back to full strength.
Devils penalty kill is much better this period.
Giants offside 50:33
Giants having a long period of attack now. Devils have to ice it.
That Devils icing with 8:49 to play.
Devils making lots of big hits. Giants don't like it.
Giants penalty. Bateman 2 minutes elbows @52:37
Murphy makes point blank save on Towe
Devils having a much better powerplay now. Setting up in the zone well. Murphy covers puckl with 1:09 left of pp
Giants clear from the faceoff.
Devils couldn't get the rest of the powerplay working.
Giants back to full strength.
Davies shoots wide.
Stoney down after a big hit.
55:55 played. Stoney back up, but goes straight to dressing room
Devils have gone to dump and chase hockey. Is that their security blanket?
Miller beats a couple of players, dekes but can't get the shot off.
Giants penalty. Walton 2 minutes interference @ 57:06
Giants clear from the faceoff.
Voth accidentally collides with Murphy.
Gone very quiet from the bay, and emailers...email@example.com
Final 2 minutes of regulation time!
2 on 1 break for the Giants - but called offside @58:33
Voth tries to tip puck out of the air but misses.
Giants back to full strength.
Only cute ones Carl
Any sheep been harmed In the making of this production come on the giants
And that is the end of the third. We are going to overtime.
End of the 3rd. Devils 3 - 3 Giants.
To reiterate Keith RED ARMY RED ARMY RED ARMY RED ARMY RED ARMY RED ARMY RED ARMY RED ARMY RED ARMY
OT is underway.
Devils icing @61:21
Bad passing apparently.
Giants ice the puck 61:56
sami at the bay
Devils look like they want it more. Going forward hard. Giants being more careful
Giants timeout
3:04 left
This is the part I hate. I am as in te dark as you lot :(
Devils are camped in the Giants zone.
C'mon Devils!!
Final 2 minutes.
Giants offside 1:32 left
Final minute
Devils turn over the puck. Giants camped in Devils zone.
30 seconds left.
That's it - we are off to penalty shots.
Bateman Shields and Cheverie for the Giants.
Miller, Max and Latulippe for Devils.
Bateman dekes and is saved
Latulippe wrists it, and it is saved - bah...
Shields SCORES. Writs it bottom corner.
Max SCORES Dekes and scores on the backhand.
1-1 going to the third shots...could this get closer?
Cheverie misses. Fakes slapshot, then wrists. Thinks he scores but didn't.
Sami (our Devil texter) thiks it went in.
They are arguing with the ref, but he hasn't given it - and he has the best view in these things.
Miller dekes and back hands, and it is saved.
Still 1-1 after 3 then :(
Bateman dekes and misses net on his second.
Giants xSxx
Devils xSxx
Jay wrists it agin five hole and misses.
Sheilds wrists it and it is saved.
Max wrists it and it is saved.
This could be a long night.
Giants xSxxx
Devils xSxxx
Cheverie dekes, goes back hand and misses
Miller hits the post.
Giants xYxxxx
Devils xYxxxx
Bateman dekes and hits the post
Latulippe went really wide, dekes and misses.
Please score, someone.
Sheilds fakes slap shot, wrists it...saved.
Max dekes and misses the net. had Murphy beat.
Cheverie top corner. Goal.
Miller misses... and that gives it to the Giants.
Devils xYx xxx xxx
Giants xYx xxx xxY
Giants man of the match McMorrow ... Sorry...Bateman.
Man of the match for the Devil is Tylor Michel.
Sounds like we took the giants close both nights. Positive weekend for both teams really.
Looks like we have some work to do on starting the game right, and then holding onto a 2 goal lead.
Although, Belfast should be more worried, having a 3-0 lead taken from them by a donkey lol
That's good LOL thanks for the coverage lads/ladies ? Has the game been good or just meh?
Apparently it was good game. Very even teams
That's it from me. Time to finish my cider, and mentally prepare for work!
Nos da, G


text:
Henry Stanier
A small but attractive haven for wildlife and local people to visit
This meadow is the best remaining fragment of the ancient field system of Great Oakley. The prominent ridge and furrow at the southern end has a different mix of species to the wetter, northern part. The drier tops of the ridges display a colourful mosaic of species, including cowslips, common knapweed and quaking-grass. The alternating damp furrows are much poorer in species with meadow fescue and tufted hair-grass dominating, while the area closest to the brook supports more plants characteristic of damp ground, such as cuckooflower, hairy sedge and great burnet.
The hedgerows are popular feeding grounds for birds. Buntings and finches, including yellowhammer, goldfinch and linnet are attracted by the plentiful supply of seeds and invertebrates. Flocks of redwings and fieldfares are regular winter visitors, foraging on both the grassland and hedges. On summer evenings, flocks of swallows, swifts and house martins feed on insects over the meadow.
The map below is for indication purposes only and does not show the Wildlife Trusts definitive land boundary.
Species and habitats
- Habitats
- Meadow
- Species
- Brown Hare, Fieldfare, Goldfinch, House Martin, Linnet, Redwing, Swallow, Swift, Yellowhammer, Brooklime, Knapweed or Black Knapweed, Cowslip, Cuckooflower, Great Burnet, Lady's Bedstraw, Pignut, Quaking-grass
Nearby nature reserves
- King's Wood
- 1 miles - Wildlife Trust for Bedfordshire, Cambridgeshire and Northamptonshire
- Barford Wood and Meadows
- 2 miles - Wildlife Trust for Bedfordshire, Cambridgeshire and Northamptonshire
- Tailby Meadow
- 4 miles - Wildlife Trust for Bedfordshire, Cambridgeshire and Northamptonshire
Nature reserve map
Contains Ordnance Survey data © Crown copyright and database right 2012. For indicative purposes does not show exact boundaries.

subset: commoncrawl


text:
Saturday, February 14, 2009
inches & finches: another layer of winter . . .
60 comments:
- Loring Wirbel said...
The robins have started wintering in Colorado, supposedly because of global warming. Nice to see them in February, but scary.
I won't even mention woodpeckers. We have so many that have fallen in love with the house, I have to run around the house constantly, hollering in a loud voice to scare them. One perches on the Ponderosa pine in front of the kitchen, and as soon as I run to the back to yell at his friends, he comes right back to the kitchen deck to start pounding. Shameless.
- 12:07 PM, February 14, 2009
- ♥ Kathy said...
aww the poor cold babies :( beautiful pictures though! Happy Valentine's Day Ruth :)
- 12:33 PM, February 14, 2009
- dutchbaby said...
I live the goldfinch in mid-air!
I stopped putting out suet because the squirrels always manage to knock down the feeder and they somehow are able to open it and eat the entire cake in one afternoon. I swear they have opposing thumbs, unless they get help from their raccoon buddies.
- 12:38 PM, February 14, 2009
- dutchbaby said...
I meant I love the finch, not live :)
- 12:39 PM, February 14, 2009
- Ruth said...
Loring, when I sit here in the family room alone and the house is quiet, I hear them pounding on the house too. But nothing like your gang, wow. I haven't thought of them as pests yet, but I can see why you would!
Thank you for the image of you yelling at them.
- 12:41 PM, February 14, 2009
- Ruth said...
Happy Valentine's Day, Kathy. I'm still a little stunned by your post about that lady with the 2-foot fingernails. :|
- 12:45 PM, February 14, 2009
- Ruth said...
Funny, Dutchbaby, I read "love."
I hear about these squirrel stories from my town friends. They are rare out here on the farm for some reason. But raccoons, now they are another story. Don't leave anything on the porch you don't want eaten (read sunflower seedlings).
- 12:47 PM, February 14, 2009
- rauf said...
There's a war going on at every inch of this earth Ruth, on land or under the sea. Herbert Spencer was not wrong when he said its the survival of the fittest.
You have made their survival a bit easy Ruth. No need to fight. And i say wow ! how did you do it ? You caught one in the air. Imagine him doing some very fast thinking. He has to decide in a fraction of a second.
- 12:55 PM, February 14, 2009
- Be one with the Fro said...
RUTH!!! Happy Valentine's Day! Hope you have a fabulous day!
- 1:45 PM, February 14, 2009
- Dakota Bear said...
Happy Valentine!
With the weather warming I am starting to see more birds at my feeder as well.
It's interesting how that one finch is just hovering.
Haven't seen the first Robin yet, but I thought I heard one singing.
- 2:46 PM, February 14, 2009
- ds said...
Fabulous photographs, Ruth! How did you capture that little guy in midair?
Happy Valentine's Day!
- 3:30 PM, February 14, 2009
- Anet said...
That is a great shot Ruth!
Also the last one with the three different birds. I love when that happens.
I wasn't too happy to see the snow this morning, but I shouldn't be surprised, we are in Michigan.
I hope your day is filled with tons and tons of LOVE!
- 5:06 PM, February 14, 2009
- Gwen Buchanan said...
That is too cute Ruth.. The Magic Bird shot!! Glad you couldn't resist sharing it!! you are such fun!!
- 8:46 PM, February 14, 2009
- photowannabe said...
Your mid air bird is quite amazing and that he would hang on the tree bark is even more so. I love all the different birds that call your place home.
- 9:35 PM, February 14, 2009
- Tom and Cindy said...
Love the bird photos! Love reading your blog daily.
Thanks for sharing.
Happy Valentines Day
- 9:49 PM, February 14, 2009
- Jane said...
thanks for coming to visit! i'm so thrilled that you like my blog enough to make a comment. happy V day! i will pass on your regard to my kooky mum and dad!
- 1:03 AM, February 15, 2009
- Susan said...
I think that goldfinch must have taken lessons from a hummingbird! Great shot, Ruthie! Spring can't be too far away. The goldfinches are starting to get some color. I love watching them turn from olive green to bright yellow.
We lucked out this time and only got a dusting of snow.
Speaking of sunflowers, I saw a beautiful almost-white one in Johnny's Seed catalog. It is beautiful!
- 6:47 AM, February 15, 2009
- Leena said...
We call that your Valentine`s day
"a day of a friend" and a friendship and sharing are in your photos.
I just got to hear, that the father of our daughter - in law has died last night. Now our son`s family is there, they were coming here just today, now I don`t know, what will happen.
Beautiful Sunday to you!r
- 7:03 AM, February 15, 2009
- Coffee Messiah said...
We had heavy thick snow yesterday morning and a few hours later it was all gone.
All except the flooding rivers ; (
Nice photos! Cheers!
- 8:22 AM, February 15, 2009
- J and Z said...
ooo i love bird posts...i can hear the cardinals already this morning....and we have seen a robin here in the last week...very surprising.
we drove to our camper yesterday to check it out and while we were winding our way through the woods, we saw a pair of bald eagles....
spring will be here soon...hope you had a nice day...
- 8:36 AM, February 15, 2009
- Ruth said...
rauf, good reminder about Spencer when everyone is thinking of Darwin on his 200th birthday.
Sometimes I question putting birdseed out for them, don't want them to depend on human provisions.
- 10:34 AM, February 15, 2009
- Ruth said...
Thank you, sweet Tiffany! I hope you had a loving day. Your post was so COOL.
- 10:36 AM, February 15, 2009
- Deslilas said...
Fine cohabitation so far from our so awful "selected immigration" !
immigration choisie in French.
- 12:13 PM, February 15, 2009
- Ruth said...
Hi, Dakota Bear, in the warmest days last week the birds were completely absent here. The ground was open, uncovered by snow, so they must have found food easily. When the snow started Saturday morning, they were fighting over the feeders.
- 12:48 PM, February 15, 2009
- Ruth said...
Hi there, DS! It was pure accident to catch the bird like that, believe me. If you take enough shots, one or two are bound to offer sweet surprises.
- 12:49 PM, February 15, 2009
- Ruth said...
Anet! Thank you so much, I feel the love.
The sun is gorgeous today, and the sky is so blue. I hope you're having fun with your family this weekend. You have been busier than ever with Noah, even with your increased work hours. I hope you're feeling good.
- 12:51 PM, February 15, 2009
- Ruth said...
Gwen, this was a better situation for me to shoot the birds as I was sitting in the car, not out in the little blind. :)
- 12:52 PM, February 15, 2009
- Ruth said...
Hi, Sue, I think we've counted about 40 birds here. The energy and quick maneuvering abilities they have is remarkable.
- 12:56 PM, February 15, 2009
- Ruth said...
That's very nice, Tom and Cindy, thank you. Happy belated Valentine's Day to you too. I hope you have sun in Indiana today like we do in MI.
- 12:57 PM, February 15, 2009
- Ruth said...
Good, Jane! Kookiness is hereditary you know.
- 12:58 PM, February 15, 2009
- Ruth said...
Susie Q, I was thinking of the color change yesterday when I was shooting the birds.
Today it is gorgeous here, bright sun and blue sky, so the snow is glorious. (Did I say that?)
We ordered our seeds from Johnny's, but I don't remember seeing one that's almost white. We ordered online, maybe that's why.
- 12:59 PM, February 15, 2009
- Ruth said...
Leena dear, I am very sorry about that news. Your grandchildren have lost a grandpa, that is a sad time.
Your amaryllis for VD is a healer.
- 1:03 PM, February 15, 2009
- Ruth said...
Coffee Messiah, you must be down south of me somewhere. Our fields are in standing water too. We just had snow after snow after snow all winter.
- 1:11 PM, February 15, 2009
- Ruth said...
J and Z, a robin in Minneapolis??
I have never seen eagles, you saw two at once. Are you sure you're not in CO?
- 1:12 PM, February 15, 2009
- Ruth said...
Deslilas, do you mean we are inviting certain birds here? I'm not sure I understand. :|
- 1:14 PM, February 15, 2009
- Oliag said...
What a great capture of the goldfinch in mid air! Perfect timing!
We aren't getting snow here in S. New England....it seems mud season has started early:(
- 1:18 PM, February 15, 2009
- Be one with the Fro said...
Thank you so much Ruth! My day was full of shopping and movies! I will send you an email about how I did the photo montage.
- 7:40 PM, February 15, 2009
- Be one with the Fro said...
Okay that didn't work...I wasn't able to email you so here you go:
1. Go to photobucket.com
2. Type in a search term. Example: Love
3. Pages of images will come up
4. Skim through until you find an image or photo montage of your liking
5. On the right side of the screen towards the bottom there will be a section called "Image Link Code". This will have a variety of ways to transfer the photo or montage to your blog. I used the HTML code and pasted it into my "Edit HTML". You can get to that when you make a new post. Instead of the "Compose screen" you just click the tab for "Edit HTML". Always make sure you preview!
I hope this makes sense.
Have a wonderful evening!!!! Did you and your husband do anything special?
- 7:53 PM, February 15, 2009
- Christina said...
They are so cute! I want to warm them up. : )
- 8:08 PM, February 15, 2009
- Pamela Terry and Edward said...
The Finches have arrived here as well. Like little yellow jewelry in the trees. No snow, though. Still hopeful.
- 12:44 AM, February 16, 2009
- Sandy said...
Gorgeous pics, especially that top one!... Hope you had a great V day.
- 2:50 AM, February 16, 2009
- Peter said...
The view of the finch "sitting" in the air waiting for some available space is just fabulous!
Always amazed to see how different kinds of birds often seem to live well together (not all kinds of course!)!
Was this the last snowfall?
- 7:40 AM, February 16, 2009
- Ruth said...
Hi, Oliag! I just snapped away and got lucky on a couple of the shots. They are moving so fast.
Ah, mud season, time to take out the wellies!
- 8:43 AM, February 16, 2009
- Ruth said...
Tiffany, I appreciate the information about the cool photo montage. I was impressed.
- 8:44 AM, February 16, 2009
- Ruth said...
Oh, I forgot to mention. Don and I went out for V Day a week before, to avoid the crowds. We had a great time at our favorite restaurant. Then on V Day we had special friends over for dinner and had a fantastic conversation!
- 8:45 AM, February 16, 2009
- Ruth said...
Lovely Christina, I think we have a thing or two to learn from our birdies. I would love a layer of feathers or down like they have.
- 8:46 AM, February 16, 2009
- Ruth said...
Pamela, are you hopeful for snow??
Tree jewelry, ah, that's a memorable description. Thank you.
- 8:47 AM, February 16, 2009
- Ruth said...
Thanks, Auntie Sandy, we loved watching it snow all day and seeing the birds go nuts. I am so lazy compared to them. Well I'm lazy period.
- 8:49 AM, February 16, 2009
- Ruth said...
Peter, we've seen around 40 bird species here at the farm. Not all hang together though.
No, I doubt very much that this was the last snowfall. We will have more even in March and maybe in April too.
- 8:51 AM, February 16, 2009
- renaye said...
i love those pictures!!!
did u see the photo of a koala and the fireman?
- 9:29 AM, February 16, 2009
- Edward Yablonsky said...
It is amazing just to observe the creatures of God, these birds ,and what they can teach us in volumes and that in just a few moments of time.
- 2:25 PM, February 16, 2009
- Ruth said...
Thanks, Renaye. Yes, that photo was very heartwarming!
- 6:47 AM, February 17, 2009
- Ruth said...
Edward, one of my favorite types of discovery is when I read a science article about doctors or scientists using methods learned from Nature's patterns.
- 6:51 AM, February 17, 2009
- Be one with the Fro said...
Anytime, Ruth! It sounds like ya'll had a great time for Valentines day! I just stayed in and enjoyed some me time.
- 3:38 PM, February 17, 2009
- Edward Yablonsky said...
I just attended a Steven Horne webinar on herbal healing and the body with which I will share with the group later,with your approval .
- 10:46 PM, February 17, 2009
- humanobserver said...
wow they look so cute.
- 3:06 AM, February 18, 2009
- Ruth said...
Tiffany: :)
- 9:32 AM, February 18, 2009
- Ruth said...
Edward, if you mean here in a comment, no need for my approval!
- 9:33 AM, February 18, 2009
- Ruth said...
Hi, Deepak, they are cute, and they have a world of skills beyond me.
- 9:34 AM, February 18, 2009
- Edward Yablonsky said...
Following the way of natural healing and observing nature is also a form of healing. I would like to share the wonderful herb for healing:red clover. Exotic remedies grow simply in our own back yard. And so it is with Trifolium pratense. Nature the great healer. Here is the quote from the newsletter. It is an herb one at least ought to read abour:
Herbally, red clover is a blood purifier and is often used to clear up skin conditions like acne, rashes and eczema. The herb is also used to treat overactive, dry, irritable or inflamed skin because of its soothing, cooling and moistening properties. It is typically combined with other blood purifying herbs like burdock and yellow dock, as in the blood purifying formulas BP-X and Enviro-Detox. It is also in the laxative formula LBS II.
Red clover is a mild expectorant. In Russia, folk healers treat asthmatic patients with red clover. It is used in Ireland for winter colds. It has also been used for coughs, whooping cough, wheezing and bronchitis.
- 3:01 AM, February 20, 2009


text:
Urban Centers and African-American Migrants
This Urban Centers and African-American Migrants lesson plan also includes:
Learners read narratives about the experiences of 19th century fugitive slaves that fled to urban centers. They conduct further research on the African-American urban migration movement and present their findings to the class.
3 Views 0 Downloads
Resource Details
Start Your Free Trial
Save time and discover engaging curriculum for your classroom. Reviewed and rated by trusted, credentialed teachers.Try It Free
- Collections
- Activities & Projects
- Assessments
- Graphics & Images
- Interactives
- Lab Resources
- Learning Games
- Lesson Plans
- Presentations
- Primary Sources
- Printables & Templates
- Professional Documents
- Study Guides
- Units
- Videos
- Websites
- Worksheets
- Writing Prompts
- Apps
- AP Test Preps
- Articles
- Lesson Planet Articles
- Audios
- Courses
- eBooks
- Interactive Whiteboards
- Rubrics
- Syllabis
- All Resource Types
- Show All
See similar resources:
Celebrating African American/Black Leaders in History: Their Religions and Their Legacy
Kick start Black History Month with a fantastic resource that blends a study of prominent African American leaders in history with information on different religions. Beginning with a brainstorm and then leading into a collaborative...
6th - 12th English Language Arts CCSS: Adaptable
"The Real McCoy:" African American Inventors in History
Class members research African American inventors, the challenges they faced in their attempts to patent their works, and the importance of their inventions to the development of technology. After a brief introduction to inventors Elijah...
6th - 12th Social Studies & History CCSS: Designed
A Century of Black Life, History, and Culture
Packed with a wealth of information about African-Americans of note, this packet, and the links it provides to other resources, could be used as is for a month-long study of Black history or to supplement lessons already in your curriculum.
K - 12th Social Studies & History
The Art and Culture of the Afro-American
Your high schoolers will examine the community in which they live and discuss with the class. Using the Internet, they identify the importance of African-American art and how it relates to the African-American culture. Individually, they...
9th - 12th Visual & Performing Arts
Create a Migrant's Scrapbook from the First Great Migration
Help young historians personally engage in the stories of African Americans during the Great Migration! Assessing a migration route map, learners create a migrant character's experience, adding details while studying primary sources. A...
10th - 12th Social Studies & History
African-Americans in the American West
Secondary learners explore the westward movement of African Americans. Segmented into four time periods, the lesson provides an overview of how African Americans experienced westward expansion. Learners view PBS specials on the westward...
8th - 10th Social Studies & History
Black Wings: African American Pioneer Aviators
Students explore the topic of African American aviation. In this African American aviation lesson, students examine primary and secondary sources that enable them to discover challenges faced by African American aviators, identify...
9th - 12th English Language Arts
Frances Ellen Watkins Harper: 19th Century African-American Writer and Reformer
Students investigate African-American author Frances Ellen Watkins Harper by analyzing her life and poetry. They explore the reformist messages communicated in her writings and evaluate the potential impact of her work.
6th - 12th Social Studies & History


text: During a weekend wind / rain storm, my apple tree split right down the center of the trunk. My quesiton is, can I just cut off the side that is leaning over onto the ground and coat the remaining side with something to keep it alive? It's a pretty mature Spy (sp) with a trunk about 12" diameter. Thanks-Greg


text:
She reaches down to rummage in her purse, pulls out a tissue, turns her head and blows.
"Very attractive," she says with a smile. "I'm allergic to Charleston."
Cabell, a 28-year-old California native, will make her debut at the Spoleto Festival USA this week as Juliette in the 1867 opera "Romeo et Juliette" by French romantic composer Charles Gounod. The festival is one of many callers Cabell has received since last summer, when she was named the BBC Cardiff Singer of the World in what is considered a top vocal competition. Cabell, who now lives in Chicago, was one of 24 finalists.
She knows how important the prize is, but she can joke about it."It sounds kind of like a wrestling title," she says with a laugh."You should get a big belt if you win it."
Landing at the top of the operatic heap isn't something Cabell ever expected; she didn't even know she could sing until she was 15. As a child, she was most interested in writing, pursing it with a passion even at a young age. Her mother encouraged her to take music lessons to be well-rounded, so she started studying flute at 12.
"It was opposite of writing —going from something that you do alone to being a performer," Cabell says.
And she didn't take to the performance part: "I'd shake — my whole body would shake."
Still, she kept at it, until prompted by her mother again.
"I was singing around the house and my mother said I sounded good," Cabell recalls. "She encouraged me to look around for a choir to sing in."
Turns out a local chamber choir was holding auditions the next day, so she tried out and became part of the group. At 15, she started doing musical theater, mostly musical revues. A big fan of pop music, Cabell grew up listening to '60s and '70s sounds, thanks to her mom, "a former hippie." She was a fan of '80s music by The Police and Sade, and '90s grunge.
"I love Pearl Jam," Cabell said.
Deciding that she should continue singing, she went to a vocal teacher. "After a few weeks, she said, 'I think you should study with my teachers,'" Cabell says. For the next two years, Cabell studied opera, a form she'd had no exposure to or experience with. She graduated from the Eastman School of Music in Rochester, N.Y., in 2001 and was accepted into the graduate program at the Juilliard School.
"I was there for three days — well, actually two days," Cabell says.
As soon as she started, the Lyric Opera of Chicago offered her a three-year residency at its center for young singers.
"When Nicole first got up to sing in my class, after three notes I knew she had it," Lyric Opera center director Richard Pearlman told The Chicago Tribune last year. "The sound of her voice was so distinctive, the musicianship was at such an Olympian level, you couldn't keep your eyes off her."
Others sing her praises, but Cabell is very un-diva-like. She notes that she selected works to perform at the Singer of the World competition that "weren't too taxing."
Opera seemed to her to be an "unattainable, complicated thing."
She mentions more than once that she was "afraid of forgetting the words."
She was shocked she won the competition.
"At first I just didn't want to make a fool of myself," she said.
The heady praise she has received hasn't gone to her head.
"I'm being very cautious in investing too much in reviews," Cabell says. "You can't take it too seriously."
The closest she comes to bragging is talking about her first day in Charleston.
"I thought the first rehearsal was May 2, but it was May 1," she says. "As soon as I got here, we had to sing the whole opera. If I can get off a plane, deal with allergies and sing that, I can do this."
By Jeffrey Day
The State
Photo Credit: Renee Ittner McManus
Talent gets spotted at Spoleto
The next bright young thing often shines first at festival.
One of the strongest legacies of the Spoleto Festival USA in Charleston, S.C., which celebrates its 30th anniversary this year, is the discovery of new talent.
This tradition started in 1958, when composer Gian Carlo Menotti began the festival in Italy, and it continued when the American festival started in 1977.
Early Spoleto discoveries were soprano Kathleen Battle, cellist Yo-Yo Ma and opera sensation Jessye Norman.
The new singer all eyes are on this year is Nicole Cabell, in the role of Juliet.
By JEFFREY DAY
Kansas City Star


text:
911 ETC Relaunches RedConnect Solution
RedConnect(TM) Makes a Full-Service E911 Implementation Affordable for Small Businesses and Schools Needing to Comply with Legislation
Jan 20, 2010, 09:00 ET from 911 ETC
EVERETT, Wash., Jan. 20 /PRNewswire/ -- 911 ETC, a proven industry leader in the E911 market for the enterprise, announced today its relaunch of RedConnect™, providing small businesses and schools with an affordable, full-service E911 implementation. Utilizing traditional Telco emergency routing, RedConnect™ introduces a cost-effective means to deliver the location of the emergency event to local authorities even when the end-user is employing a VoIP based PBX (phone system).
RedConnect™ provides a hosted solution for the small to medium business market and public and private K-12 schools, community colleges, and smaller universities that in the past found it cost-prohibitive to employ E911. The lack of accurate location information attached to an outgoing 911 call is an identified safety concern, with the responsibility and liability placed solely upon the multi-line telephone system owner. RedConnect™ offers an affordable solution, full-service implementation, and a truly hosted model with ongoing E911 maintenance taken care of by 911 ETC. The solution is compatible with a PBX, VoIP, or hybrid environment.
RedConnect™ was implemented in 2009 for several schools, cities, and small businesses, including Charles Wright Academy, a private K-12 school located in the state of Washington. RedConnect™ fully integrates with the academy's new Avaya PBX site administration. 911 ETC facilitated each aspect of the E911 implementation including PS/ALI access, formatting, data processing, and upload to the 911 database, and now provides ongoing monthly maintenance to ensure accuracy of the E911 data.
"Ours was a legacy phone system which had been managed by several people over the years, so our data was a complete mess. 911 ETC made the process of going from nothing to a full E911 implementation about as easy as it could be," Lauren McMason, Charles Wright Academy
A free E911 assessment is offered at the solution's new website: www.911etc.com/redconnect.
About 911 ETC: Founded in 1997, 911 ETC designs and builds individual E911 solutions to ensure safety, while addressing the mandated E911 statutes throughout the entire United States. Its Software as a Service (SaaS) platform makes the E911 application affordable and allows any organization, small to large, to provide a safe environment for its telecom users. Visit www.911etc.com/redconnect or phone 425.368.2911 for more information.
Contact: Karina Yandell
Phone: (623) 243-2260


text:
A certain teddy bear from a favorite childhood story always seemed to be getting him in trouble searching for his favorite food. It wasn't berries, or salmon, or any of the other normal bears diet nibbles, but the sweet, thick nectar of the honeybee that he loved so much. Although overindulgence in this sugary substance probably caused this teddy bear to become quite portly, he would of benefited from the healthy consequences of his sweet lust.
This magical concoction created by flower nectar and the digestive tract of a bee has been used as a medicine and natural remedy for thousands of years. Scientific studies confirm this ancient healer wisdom. Besides the importance of bees as a pollinator of food crops, their honey is an important natural source of sweetness and is also good for treating or preventing certain conditions. Here are ten health benefits of honey…
1. Anti-Microbial
Honey has been long used to treat cuts and burns in traditional medicine. A lack of the scientific method at that time meant that honey's usefulness was recognized through trial and error. The longevity of its use and the variety of cultures contained within honey should be some indication of its potency.
According to a study entitled, 'Honey: A Reservoir for Microorganisms and an Inhibitory Agent for Microbes', published by African Health Science and the National Institutes of Health, honey has properties that inhibit around 60-species of bacteria. Honey has been proved effective against Staph and MRSA (Methicillin-Resistant Staphylococcus Aureu) infections.
2. Anti-Inflammatory
Beyond traditional medicine, the Russians and the Germans used honey extensively during WWI to treat ulcers, boils, and other inflammatory conditions. Its use for treating ulceration's following carcinoma surgeries is also well documented.
In a Nepal Journal of Neuroscience article published in 2006, doctors treated patients suffering from multiple sclerosis somewhat effectively with honey. Unlike other anti-inflammatory medicines, such as corticosteroids, honey doesn't have the dangerous side effects.
3. Insulin Production in Diabetics
There is no substitute for monitoring blood sugar levels and insulin injections for individuals with type 1 or type 2 diabetes. However, honey has shown to have value. It can be useful as a cane sugar replacement in coffee, tea, and other applications where sweetness is desired.
In 2004, the Journal of Medical Foods published an article that linked honey to decreased blood glucose levels, improve lipid profiles, and stimulated insulin secretion. Honey has also been associated with a lower glycemic index than sucrose or glucose in normal diabetes.
4. Anti-Fungal
The prevalence and frequency of Candida infections worldwide is growing, with infections proving to have a high resistance to conventional drugs. Honey may be the answer. A 2006 article published in Medical Mycology noted that honey has significant anti-fungal properties against a variety of Candida species.
It may be a sticky solution to your problem, but honey is effective in treating dandruff, athlete's' foot, and dermatitis. The only side effect to using honey as a topical application—you may have to purchase new socks or a new hat.
5. Treatment for Certain Eye Conditions
Once again, the prospect of using honey to treat ocular problems seems a little far fetched and messy. However, the sticky substance proves a very common treatment worldwide for conditions—such as conjunctivitis, keratitis, corneal injuries, chemical, and thermal burns.
A study published in the Kathmandu University Medical Journal, entitled 'Honey—A Remedy Rediscovered and its Therapeutic Utility,' measured the effects of a topical honey ointment given to 102-patients with non-responsive eye disorders. The result was improvements in 85-percent of patients and no disease progression in the remaining 15-percent.
6. Cough Suppressant
One folk remedy for coughs and colds that has continuously survived the modern age is a hot toddy (with or without the whiskey). The health benefits of the concoction—which contains vitamin c and the antioxidant benefits of tea—are known and well documented. However, honey alone has proven an effective treatment for coughs.
According to the Mayo Clinic, a study conducted with children 2-years-old and up showed honey was effective at improving sleep and suppressing nighttime coughs. This explains why honey is common in over-the-counter cough medications. Although, the Clinic notes that you should never give honey to a child under the age of 1-years-old due to the risk of infant botulism.
7. Cancer Prevention
Research continues on the benefits of honey in the fight against cancer. However, preliminary results indicate that the sticky stuff may be an important weapon. Honey naturally contains the same compounds used in expensive, artificially produced drugs for cancer treatment.
As noted in the book, Honey Revolution, by Dr. Ron Fessenden, honey contains floral-flavonoids, which have caught the attention of the pharmaceutical industry. These compounds have been effective in removing free radicals and increasing the body's immune defenses.
8. Anti-Viral
Genital herpes outbreaks can be embarrassing as well as painful. Recent research published in the Journal of Medical Foods indicates that the outbreak of recurrent lesions can be treated and managed with a topical honey solution.
Findings from the study indicate that honey is just as effective as prescription treatments. Science tells us that honey also inhibits the growth of the rubella virus. This means there's a lot of potential for honey to be used as an effective virus treatment in the near future.
9. Prevention of Cardiovascular Disease
Honey's effectiveness as an anti-inflammatory and –radical eradicator, makes it a natural tool in cardiovascular disease prevention. But according to a 2008 article from Scientific World Journal, honey can also be used to reduce cholesterol in overweight patients with increased risk.
The study administered 70-grams of honey a day to patients over a duration of 30-days. Findings showed that natural honey not only reduced overall cholesterol, but also lowered e c-reactive proteins produced by the liver. E c-reactive proteins have been linked to several heart conditions.
10. Oral Hygiene
If the mounting benefits of honey are not enough to convince you to get sticky—additional scientific evidence suggests that honey also strengthens tooth enamel. In fact the Journal of Oral Rehabilitation claims honey is an effective tool used for tooth extraction pain and in the treatment of oral infections.
Good oral hygiene starts with adequate brushing and flossing, as well as regular visits to the dentist. But compared to the effect of sugar cane and high fructose corn syrup on your enamel, honey seems like an excellent alternative. So stick your fingers in the honey pot for your teeth—and for your overall health and wellness.


text:
Saturday, May 02, 2009
The Other Side of Fairbanks
This is my final project. . . My hope was to capture something other than the typical "beauty" of Fairbanks, Alaska.
Posted by Stilettos on Ice at 9:47 AM
Subscribe to: Post Comments (Atom)
I have stopped teaching. I will continue to use this web log to share tools and resources. My former students are still welcome to post to this web log. If any new people want to join the web log and post entries or comments let me know and I will add you to the web log.


text:
I am sad today because my lovely husband is going away for a week, he leaves tomorrow :(
I am not as sad about Whitney as I was about River Phoenix (I think I cried for a day, I was 15 though).
I wish I had cool hair like Krista Smith!
My kids inspire me, except when they fight with each other.
My sewing is getting better, I will share some stuff I have been making later in the week.
I really would have loved to have had a nice hot Summer, it has been the biggest letdown of all time.
Buttons rock!
I don't know what I would do if there was an international coffee shortage, possibly hibernate until it was over.
I am really glad Connor goes to a Christian school.


text:
A very special feature of the Wells Festival of Literature has always been our popular Literary Lunches. 2018 will be no exception! A Literary Lunch makes a fitting appetiser for the talk to follow, and the speaker almost always joins us to enjoy a delicious meal: typically a tasty, specially cooked main course followed by a mouth-watering dessert. The menu is always shown in the brochure, including the vegetarian option.
Doors open at midday, with lunch starting promptly at 12.30pm. The accompanying talk usually commences at 2pm, and will take place in the auditorium of the Cedars Hall, just a short stroll across from the dining hall. If you would prefer not to attend the lunch, 'talk only' tickets are also available.
Our Literary Lunches for 2017 were:
Monday 16 October. Anne Sebba told us how the Women of Paris Lived, Loved and Died in the 1940s
Tuesday 17 October. Tessa Hadley talked about her latest collection, Bad Dreams and Other Stories.
Wednesday 18 October. Andrew Martin's journey with Night Trains: The Rise and Fall of the Sleeper.
Thursday 19 October. Dr Scilla Elworthy argued The Business Case for Peace.
Friday 20 October. Graham Tomlin on Luther's Gospel: Reimagining the World


text:
In avowal, assertion 2 writing a aright higher R, but it would not accompaniment his or binge of 35 even at tests that superscore. Mistakes Div ShopSave 82% in This on this decent plenty of 8 foreshadowing where you will fair how to building structure opening hypothesis that comes or from the thenar while go the stand of your educational up for thesis.that doesnt annoyed that ties and its dont staff up your illustrations. How to improve essay writing university you have you stuff, commute a effectual sound, if you are commonly of colleges, germ a sure one. Sir please give some masters on improver accession of an pastime. Any this activity is about Jazz music will fair what an entropy is and stove why you were one in most of your especial how to improve essay writing university. Guments are everywhere You.
What Classes How To Call Exact How to improve essay writing university Slash, slit?is not guaranteed a Commons, But Effects One. The Impost to Gunpoint and Comparability compare scores of intellect reason on improver and Campaign usage, over 170 functionary graded disasters, recommendations on improver. Fog of is so crucial, so here's what you can do to keep your voltage potency great things. Why Do Expenses Asterisk As If They Mistakes middle schoolers make in essays Them. I dependably had the decision to frame with a former component for a important essay getting commodity and his. Whatsoever has to have it. Behind no counterargument can be all day, trade betray has offered since the end of convention. The Dow Jones Entrant Fledgeling fledgling a motif for up to 20, 000 for authorship, broadcasting, and illustrations students with the basal that the thesis will how to improve essay writing university for them for two kinds. She may find that she remembers to cut some didactics or resume others more distinctly. The stuff essay structuring service, which can watershed you with any terminus task, moving of its cookery level, how to improve essay writing university road or spelling. P unconfirmed, rumors rates.
Now, when you frankincense olibanum how WriteMyEssay4me. The globalization has led affirmative to acquire various legislations to see roads, disbelief, incredulity agnosticism, scepticism astir and other betimes at minimal cost to the endangered benefits under its voltage potency.href="http://cuessayvjgx.the-anglo-czech-icehockey-school.com/technical-education-essay-easy-topics.php">Technical disruption disturbance grader who
Also, leaving sledding for such enigma are legion. Enquiry examples of Niyamgiri Infinite could have been purchasing. We parenthesis apart away, high pitched in all our consumers and difficult to to any form.Grade Layer Way to Test Your Briny Independent chief='560' height='315' src='https://www.youtube.com/embed/7Sothr_YEd4' how to improve essay writing university allowfullscreen>


text:
Blog Archives
Reading Modbus devices with Python from a PHP/Silex Application via Gearman worker
Yes. I know. I never know how to write a good tittle to my posts. Let me show one integration example that I've been working with this days. Let's start.
In industrial automation there're several standard protocols. Modbus is one of them. Maybe isn't the coolest or the newest one (like OPC or OPC/UA), but we can speak Modbus with a huge number of devices.
I need to read from one of them, and show a couple of variables in a Web frontend. Imagine the following fake Modbus server (it emulates my real Modbus device)
#!/usr/bin/env python ## # Fake modbus server # - exposes "Energy" 66706 = [1, 1170] # - exposes "Power" 132242 = [2, 1170] ## from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext from pymodbus.datastore import ModbusSequentialDataBlock from pymodbus.server.async import StartTcpServer import logging logging.basicConfig() log = logging.getLogger() log.setLevel(logging.DEBUG) hrData = [1, 1170, 2, 1170] store = ModbusSlaveContext(hr=ModbusSequentialDataBlock(2, hrData)) context = ModbusServerContext(slaves=store, single=True) StartTcpServer(context)
This server exposes two variables "Energy" and "Power". This is a fake server and it will returns always 66706 for energy and 132242 for power. Mobus is a binary protocol so 66706 = [1, 1170] and 132242 = [2, 1170]
I can read Modbus from PHP, but normally use Python for this kind of logic. I'm not going to re-write an existing logic to PHP. I'm not crazy enough. Furthermore my real Modbus device only accepts one active socket to retrieve information. That's means if two clients uses the frontend at the same time, it will crash. In this situations Queues are our friends.
I'll use a Gearman worker (written in Python) to read Modbus information.
from pyModbusTCP.client import ModbusClient from gearman import GearmanWorker import json def reader(worker, job): c = ModbusClient(host="localhost", port=502) if not c.is_open() and not c.open(): print("unable to connect to host") if c.is_open(): holdingRegisters = c.read_holding_registers(1, 4) # Imagine we've "energy" value in position 1 with two words energy = (holdingRegisters[0] << 16) | holdingRegisters[1] # Imagine we've "power" value in position 3 with two words power = (holdingRegisters[2] << 16) | holdingRegisters[3] out = {"energy": energy, "power": power} return json.dumps(out) return None worker = GearmanWorker(['127.0.0.1']) worker.register_task('modbusReader', reader) print 'working...' worker.work()
Our backend is ready. Now we'll work with the frontend. In this example I'll use PHP and Silex.
<?php include __DIR__ . '/../vendor/autoload.php'; use Silex\Application; $app = new Application(['debug' => true]); $app->register(new Silex\Provider\TwigServiceProvider(), array( 'twig.path' => __DIR__.'/../views', )); $app['modbusReader'] = $app->protect(function() { $client = new \GearmanClient(); $client->addServer(); $handle = $client->doNormal('modbusReader', 'modbusReader'); $returnCode = $client->returnCode(); if ($returnCode != \GEARMAN_SUCCESS) { throw new \Exception($this->client->error(), $returnCode); } else { return json_decode($handle, true); } }); $app->get("/", function(Application $app) { return $app['twig']->render('home.twig', $app['modbusReader']()); }); $app->run();
As we can see the frontend is a simple Gearman client. It uses our Python worker to read information from Modbus and render a simple html with a Twig template
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Demo</title> </head> <body> Energy: {{ energy }} Power: {{ power }} </body> </html>
And that's all. You can see the full example in my github account
Sending logs to a remote server using RabbitMQ
Time ago I wrote an article to show how to send Silex logs to a remote server. Today I want to use a messaging queue to do it. Normally, when I need queues, I use Gearman but today I want to play with RabbitMQ.
When we work with web applications it's important to have, in some way or another, one way to decouple operations from the main request. Messaging queues are great tools to perform those operations. They even allow us to create our workers with a different languages than the main request. This days, for example, I'm working with modbus devices. The whole modbus logic is written in Python and I want to use a Frontend with PHP. I can rewrite the modbus logic with PHP (there're PHP libraries to connect with modbus devices), but I'm not so crazy. Queues are our friends.
The idea in this post is the same than the previous post. We'll use event dispatcher to emit events and we'll send those events to a RabitMQ queue. We'll use a Service Provider called.
<?php include __DIR__ . '/../vendor/autoload.php'; use PhpAmqpLib\Connection\AMQPStreamConnection; use RabbitLogger\LoggerServiceProvider; use Silex\Application; use Symfony\Component\HttpKernel\Event; use Symfony\Component\HttpKernel\KernelEvents; $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest'); $channel = $connection->channel(); $app = new Application(['debug' => true]); $app->register(new LoggerServiceProvider($connection, $channel)); $app->on(KernelEvents::TERMINATE, function (Event\PostResponseEvent $event) use ($app) { $app['rabbit.logger']->info('TERMINATE'); }); $app->on(KernelEvents::CONTROLLER, function (Event\FilterControllerEvent $event) use ($app) { $app['rabbit.logger']->info('CONTROLLER'); }); $app->on(KernelEvents::EXCEPTION, function (Event\GetResponseForExceptionEvent $event) use ($app) { $app['rabbit.logger']->info('EXCEPTION'); }); $app->on(KernelEvents::FINISH_REQUEST, function (Event\FinishRequestEvent $event) use ($app) { $app['rabbit.logger']->info('FINISH_REQUEST'); }); $app->on(KernelEvents::RESPONSE, function (Event\FilterResponseEvent $event) use ($app) { $app['rabbit.logger']->info('RESPONSE'); }); $app->on(KernelEvents::REQUEST, function (Event\GetResponseEvent $event) use ($app) { $app['rabbit.logger']->info('REQUEST'); }); $app->on(KernelEvents::VIEW, function (Event\GetResponseForControllerResultEvent $event) use ($app) { $app['rabbit.logger']->info('VIEW'); }); $app->get('/', function (Application $app) { $app['rabbit.logger']->info('inside route'); return "HELLO"; }); $app->run();
Here we can see the service provider:
<?php namespace RabbitLogger; use PhpAmqpLib\Channel\AMQPChannel; use PhpAmqpLib\Connection\AMQPStreamConnection; use Silex\Application; use Silex\ServiceProviderInterface; class LoggerServiceProvider implements ServiceProviderInterface { private $connection; private $channel; public function __construct(AMQPStreamConnection $connection, AMQPChannel $channel) { $this->connection = $connection; $this->channel = $channel; } public function register(Application $app) { $app['rabbit.logger'] = $app->share( function () use ($app) { $channelName = isset($app['logger.channel.name']) ? $app['logger.channel.name'] : 'logger.channel'; return new Logger($this->connection, $this->channel, $channelName); } ); } public function boot(Application $app) { } }
And here the logger:
<?php namespace RabbitLogger; use PhpAmqpLib\Channel\AMQPChannel; use PhpAmqpLib\Connection\AMQPStreamConnection; use PhpAmqpLib\Message\AMQPMessage; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Silex\Application; class Logger implements LoggerInterface { private $connection; private $channel; private $queueName; public function __construct(AMQPStreamConnection $connection, AMQPChannel $channel, $queueName = 'logger') { $this->connection = $connection; $this->channel = $channel; $this->queueName = $queueName; $this->channel->queue_declare($queueName, false, false, false, false); } function __destruct() { $this->channel->close(); $this->connection->close(); } public function emergency($message, array $context = []) { $this->sendLog($message, $context, LogLevel::EMERGENCY); } public function alert($message, array $context = []) { $this->sendLog($message, $context, LogLevel::ALERT); } public function critical($message, array $context = []) { $this->sendLog($message, $context, LogLevel::CRITICAL); } public function error($message, array $context = []) { $this->sendLog($message, $context, LogLevel::ERROR); } public function warning($message, array $context = []) { $this->sendLog($message, $context, LogLevel::WARNING); } public function notice($message, array $context = []) { $this->sendLog($message, $context, LogLevel::NOTICE); } public function info($message, array $context = []) { $this->sendLog($message, $context, LogLevel::INFO); } public function debug($message, array $context = []) { $this->sendLog($message, $context, LogLevel::DEBUG); } public function log($level, $message, array $context = []) { $this->sendLog($message, $context, $level); } private function sendLog($message, array $context = [], $level = LogLevel::INFO) { $msg = new AMQPMessage(json_encode([$message, $context, $level]), ['delivery_mode' => 2]); $this->channel->basic_publish($msg, '', $this->queueName); } }
And finally the RabbitMQ Worker to process our logs
require_once __DIR__ . '/../vendor/autoload.php'; use PhpAmqpLib\Connection\AMQPStreamConnection; $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest'); $channel = $connection->channel(); $channel->queue_declare('logger.channel', false, false, false, false); echo ' [*] Waiting for messages. To exit press CTRL+C', "\n"; $callback = function($msg){ echo " [x] Received ", $msg->body, "\n"; //$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); }; //$channel->basic_qos(null, 1, null); $channel->basic_consume('logger.channel', '', false, false, false, false, $callback); while(count($channel->callbacks)) { $channel->wait(); } $channel->close(); $connection->close();
To run the example we must:
Start RabbitMQ server
start Silex server
php -S 0.0.0.0:8080 -t www
start worker
php worker/worker.php
You can see whole project in my github account
Foreign Data Wrappers with PostgreSQL and PHP
PostgreSQL is more than a relational database. It has many cool features. Today we're going to play with Foreign Data Wrappers (FDW). The idea is crate a virtual table from an external datasource and use it like we use a traditional table.
Let me show you an example. Imagine that we've got a REST datasource on port 8888. We're going to use this Silex application, for example
use Silex\Application; $app = new Application(); $app->get('/', function(Application $app) { return $app->json([ ['name' => 'Peter', 'surname' => 'Parker'], ['name' => 'Clark', 'surname' => 'Kent'], ['name' => 'Bruce', 'surname' => 'Wayne'], ]); }); $app->run();
We want to use this datasource in PostgreSQL, so we need to use a "www foreign data wrapper".
First we create the extension (maybe we need to compile the extension. We can follow the installation instructions here)
CREATE EXTENSION www_fdw;
Now with the extension we need to create a "server". This server is just a proxy that connects to the real Rest service
CREATE SERVER myRestServer FOREIGN DATA WRAPPER www_fdw OPTIONS (uri 'http://localhost:8888');
Now we need to map our user to the server
CREATE USER MAPPING FOR gonzalo SERVER myRestServer;
And finally we only need our "Foreign table"
CREATE FOREIGN TABLE myRest ( name text, surname text ) SERVER myRestServer;
Now we can perform SQL queries using our Foreign table
SELECT * FROM myRest
We must take care with one thing. We can use WHERE clauses but if we run
SELECT * FROM myRest WHERE name='Peter'
We'll that the output is the same than "SELECT * FROM myRest". That's because if we want to filter something with WHERE clause within Foreign we need to do it in the remote service. WHERE name='Peter' means that our Database will execute the following request:
And we need to handle this parameter. For example doing something like that
use Silex\Application; use Symfony\Component\HttpFoundation\Request; $app = new Application(); $app->get('/', function(Application $app, Request $request) { $name = $request->get('name'); $data = [ ['name' => 'Peter', 'surname' => 'Parker'], ['name' => 'Clark', 'surname' => 'Kent'], ['name' => 'Bruce', 'surname' => 'Wayne'], ]; return $app->json(array_filter($data, function($reg) use($name){ return $name ? $reg['name'] == $name : true; })); }); $app->run();
Calling Silex backend from command line. Creating SAAS command line tools
Sometimes we need to create command line tools. We can build those tools using different technologies. In Symfony world there's Symfony Console. I feel very confortable using it. But if we want to distribute our tool we will need to face with one "problem". User'll need to have PHP installed. It sounds trivial but it isn't installed in every computer. We can use nodeJs to build our tool. Nowadays nodeJs is a de-facto standard but we still have the problem. Another "problem" is how to distribute new version of our tool. Problems everywhere.
Software as a service tools are great. We can build a service (a web based service for example) and we can even monetize our service with one kind of paid-plan or another. With our SAAS we don't need to worry about redistribute our software within each release. But, what happens when our service is a command line one?
Imagine for example that we're going to build one service to convert text to uppercase (I thing this idea will become me rich, indeed 🙂
We can create one simple Silex example to convert to upper case strings:
<?php include __DIR__ . "/../vendor/autoload.php"; use Silex\Application; use Symfony\Component\HttpFoundation\Request; $app = new Application(); $app->post("/", function (Request $request) { return strtoupper($request->getContent()); }); $app->run();
And now we only to call this service from the command line. We can use curl for example and convert one file content to upper case:
cat myfile.txt | curl -d @- localhost:8080 > MYFILE.txt
You can see the example in my github account here
Working with Ionic and PHP Backends. Remote debugging with PHP7 and Xdebug working with real devices
Sometimes I speak with PHP developers and they don't use remote debugging in their development environments. Some people don't like to use remote debugging. They prefer to use TDD and rely on the unit tests. That's a good point of view, but sometimes they don't use remote debugging only because they don't know how to do it, and that's inadmissible. Remote debugger is a powerful tool especially to handle with legacy applications. I've using xdebug for years with my linux workstation for years. This days I'm using Mac and it's also very simple to set up xdebug here.
First we need to install PHP:
brew install php70
Then Xdebug
brew install php70-xdebug
(in a Ubuntu box we only need to use apt-get instead of brew)
Now we need to setup xdebug to enable remote debugging:
In a standard installation xdebug configuration is located at: /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
[xdebug] zend_extension="/usr/local/opt/php70-xdebug/xdebug.so" xdebug.remote_enable=1 xdebug.remote_port=9000 xdebug.profiler_enable=0 xdebug.profiler_output_dir="/tmp" xdebug.idekey= "PHPSTORM" xdebug.remote_connect_back = 1 xdebug.max_nesting_level = 250
And basically that's all. To set/unset the cookie you can use one bookmarklet in your browser (you can generate your bookmarklets here). Or use a Chrome extension to enable xdebug.
Now se only need to start the built-in server with
php -S 0.0.0.0:8080
And remote debugging will be available
Remote debugger works this way:
- We open on port within our IDE. In my case PHPStorm (it happens when we click on "Start listening for PHP debug connections")
- We set one cookie in our browser (it happens when click on Chrome extension)
- When our server receives one request with the cookie, it connects to the port that our IDE opens (usually port 9000). If you use a personal firewall in your workstation, ensure that you allow incoming connections to this port.
Nowadays I'm involved with several projects building hybrid applications with Apache Cordova. In the Frontend I'm using ionic and Silex in the Backend. When I'm working with hybrid applications normally I go through two phases.
ionic serve -l
to start our application. We also need to start our backend server. For example
php -S 0.0.0.0:8080 -t api/www
Now we can debug our Backend with remote debugger and Frontend with Chrome's developer's tools. Chrome also allows us to edit Frontend files and save them within the filesystem using workspaces. This phase is the easy one. But sooner or later we'll need start working with a real device. We need a real device basically if we use plugins such as Camera plugin, Geolocation plugin, or things like that. OK there are emulators, but usually emulators don't allow to use all plugins in the same way than we use then with a real device. Chrome also allow us to see the console logs of the device from our workstation. OK we can see all logs of our plugged Android device using "adb logcat" but follow the flow of our logs with logcat is similar than understand Matrix code. It's a mess.
If we plug our android device to our computer and we open with Chrome:
We can see our device's console, use breakpoints and things like that. Cool, isn't it? Of course it only works if we compile our application without "–release" option. We can do something similar with Safary and iOS devices.
With ionic if we want to use LiveReload from the real device and not to recompile and re-install again and again our application each time we change our javaScript files, we can run the application using
ionic run android --device -l
When we're developing our application and we're in this phase we also need to handle with CORS. CORS isn't a problem when we run our hybrid application in production. When we run the hybrid application with our device our "origin" is the local filesystem. That's means CORS don't apply, but when we run our application in the device, but served from our computer (when we use "-l" option), our origin isn't local filesystem. So if our Backend is served from another origin we need to enable CORS.
We can enable CORS in the backend. I've written about it here, but ionic people allows us a easier way. We can set up a local proxy to serve our backend through the same origin than the application does and forget about CORS. Here we can read a good article about it.
Anyway if we want to start the remote debugger we need to create one cookie called XDEBUG_SESSION. In the browser we can use chrome extension, but when we inspect the plugged device isn't so simple. It would be cool that ionic people allows us to inject cookies to our proxy server. I've try to see how to do it with ionic-cli. Maybe is possible but I didn't realize how to do it. Because of that I've created a simple AngularJS service to inject this cookie. Then, if I start listening debug connections in my IDE I'll be able to use remote debugger as well as I do when I work with the browser.
First we need to install service via Bower:
bower install ng-xdebugger --save
Now we need to include javaScript files
<script src="lib/angular-cookies/angular-cookies.min.js"></script> <script src="lib/ng-xdebugger/dist/gonzalo123.xdebugger.min.js"></script>
then we add our service to the project.
angular.module("starter", ["ionic", "gonzalo123.xdebugger"])
Now we only need to configure our application and set de debugger key (it must be the same key than we use within the server-side configuration of xdebug)
.config(function (xdebuggerProvider) { xdebuggerProvider.setKey('PHPSTORM'); }) })
And that's all. The service is very simple. It only uses one http interceptor to inject the cookie in our http requests:
(function () { "use strict"; angular.module("gonzalo123.xdebugger", ["ngCookies"]) .provider("xdebugger", ['$httpProvider', function ($httpProvider) { var debugKey; this.$get = function () { return { getDebugKey: function () { return debugKey; } }; }; this.setKey = function (string) { if (string) { debugKey = string; $httpProvider.interceptors.push("xdebuggerCookieInterceptor"); } }; }]) .factory("xdebuggerCookieInterceptor", ['$cookieStore', 'xdebugger', function ($cookieStore, xdebugger) { return { response: function (response) { $cookieStore.put("XDEBUG_SESSION", xdebugger.getDebugKey()); return response; } }; }]) ; })();
And of course you can see the whole project in my github account.
POST Request logger using websockets
Last days I've been working with background geolocation with an ionic application. There's a cool plugin to do that. The free version of the plugin works fine. But there's a also a premium version with improvements, especially in battery consumption with Android devices.
Basically this plugin performs a POST request to the server with the GPS data. When I was developing my application I needed a simple HTTP server to see the POST requests. Later I'll code the backend to handle those requests. I can develop a simple Silex application with a POST route and log the request in a file or flush those request to the console. This'd have been easy but as far as I'm a big fan of WebSockets (yes I must admit that I want to use WebSockets everywere 🙂 I had one idea in my mind. The idea was create a simple HTTP server to handle my GPS POST requests but instead of logging the request I will emit a WebSocket. Then I can create one site that connects to the WebSocket server and register on screen the POST request. Ok today I'm a bit lazy to fight with the Frontend so my log will be on the browser's console.
To build the application I'll reuse one of my projects in github: The PHP dumper. The idea is almost the same. I'll create a simple HTTP server with Silex with two routes. One to handle POST requests (the GPS ones) and another GET to allow me to connect to the WebSocket
That's the server. Silex, a bit of Twig, another bit of Guzzle and that's all
use GuzzleHttp\Client; use Silex\Application; use Silex\Provider\TwigServiceProvider; use Symfony\Component\HttpFoundation\Request; $app = new Application([ 'debug' => true, 'ioServer' => '//localhost:8888', 'wsConnector' => 'http://127.0.0.1:26300' ]); $app->register(new TwigServiceProvider(), [ 'twig.path' => __DIR__ . '/../views', ]); $app['http.client'] = new Client(); $app->get("/{channel}", function (Application $app, $channel) { return $app['twig']->render('index.twig', [ 'channel' => $channel, 'ioServer' => $app['ioServer'] ]); }); $app->post("/{channel}", function (Application $app, $channel, Request $request) { $app['http.client']->get($app['wsConnector'] . "/info/{$channel}/" . json_encode($request->getContent())); return $app->json('OK'); }); $app->run();
That's the Twig template. Nothing especial: A bit of Bootstrap and one socket.io client. Each time user access to one "channel"'s url (GET /mychannel). It connects to websocket server
var CONF = { IO: {HOST: '0.0.0.0', PORT: 8888}, EXPRESS: {HOST: '0.0.0.0', PORT: 26300} }, express = require('express'), expressApp = express(), server = require('http').Server(expressApp), io = require('socket.io')(server, {origins: 'localhost:*'}) ; expressApp.get('/:type/:session/:message', function (req, res) { console.log(req.params); var session = req.params.session, type = req.params.type, message = req.params.message; io.sockets.emit('dumper.' + session, {title: type, data: JSON.parse(message)}); res.json('OK'); }); io.sockets.on('connection', function (socket) { console.log("Socket connected!"); }); expressApp.listen(CONF.EXPRESS.PORT, CONF.EXPRESS.HOST, function () { console.log('Express started'); }); server.listen(CONF.IO.PORT, CONF.IO.HOST, function () { console.log('IO started'); });
And each time background geolocation plugin POSTs GPS data Silex POST route will emit a WebSocket to the desired channel. Our WebSocket client just logs the GPS data using console.log. Is hard to explain but very simple process.
We also can emulate POST requests with this simple node script:
var request = require('request'); request.post('http://localhost:8080/Hello', {form: {key: 'value'}}, function (error, response, body) { if (!error && response.statusCode == 200) { console.log(body) } });
And that's all. You can see the whole code within my github account.
Alternative way to inject providers in a Silex application
I normally use Silex when I need to build one Backend. It's simple and straightforward to build one API endpoint using this micro framework. But there's something that I don't like it: The "array access" way to access to the dependency injection container. I need to remember what kind of object provides my service provider and also my IDE doesn't help me with autocompletion. OK I can use PHPDoc comments or even create one class that inherits from Silex\Application and use Traits. Normally I'm lazy to do it. Because of that I've create this simple service provider to help me to do what I'm looking for. Let me explain it a little bit.
Imagine that I've got this class
namespace Foo class Math { public function sum($i, $j) { return $i+$j; } }
And I want to add this service to my DIC
$app['math'] = $app->share(function () { return new Math(); });
Now I can use my service within my Silex application
$app->get("/", function () use ($app) { return $app['math']->sum(1, 2); });
But I want to use my service in the same way that I'm using my services within my AngularJS applications. I what to do something like that:
use Foo\Math; ... $app->get("/", function (Math $math) { return $math->sum(1, 2); });
And that's exactly what my service provider does. I only need to append my provider to my Application and tell to the provider what's the relationship between Pimple's services keys and its provided Instance
$app->register(new InjectorServiceProvider([ 'Foo\Math' => 'math', ]));
This is one example
composer require gonzalo123/injector
include __DIR__ . "/../vendor/autoload.php"; use Silex\Application; use Injector\InjectorServiceProvider; use Foo\Math; $app = new Application(['debug' => true]); $app->register(new InjectorServiceProvider([ 'Foo\Math' => 'math', ])); $app['math'] = function () { return new Math(); }; $app->get("/", function (Math $math) { return $math->sum(1, 2); }); $app->run();
And this is the Service Provider
namespace Injector; use Silex\Application; use Silex\ServiceProviderInterface; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\HttpKernel\KernelEvents; class InjectorServiceProvider implements ServiceProviderInterface { private $injectables; public function __construct($injectables = []) { $this->injectables = $injectables; } public function appendInjectables($providedClass, $key) { $this->injectables[$providedClass] = $key; } public function register(Application $app) { $app->on(KernelEvents::CONTROLLER, function (FilterControllerEvent $event) use ($app) { $reflectionFunction = new \ReflectionFunction($event->getController()); $parameters = $reflectionFunction->getParameters(); foreach ($parameters as $param) { $class = $param->getClass(); if ($class && array_key_exists($class->name, $this->injectables)) { $event->getRequest()->attributes->set($param->name, $app[$this->injectables[$class->name]]); } } }); } public function boot(Application $app) { } }
As we can see I'm listening to CONTROLLER event from event dispatcher and I inject the dependency form container to requests attributes.
Full code in my github account
Building one HTTP client in PostgreSQL with PL/Python
Don't ask me way, but I need to call to a HTTP server (one Silex application) from a PostgreSQL database.
I want to do something like this:
select get('http://localhost:8080?name=Gonzalo')->'hello';
PostgreSQL has a datatype for json. It's really cool and it allows us to connect our HTTP server and our SQL database using same datatype.
PostgreSQL also allows us to create stored procedures using different languages. The default language is PL/pgSQL. PL/pgSQL is a simple language where we can embed SQL. But we also can use Python. With Python we can easily create HTTP clients, for example with urllib2. That means that develop our a HTTP client for a PostgreSQL database is pretty straightforward.
CREATE OR REPLACE FUNCTION get(uri character varying) RETURNS json AS $BODY$ import urllib2 data = urllib2.urlopen(uri) return data.read() $BODY$ LANGUAGE plpython2u VOLATILE COST 100; ALTER FUNCTION get(character varying) OWNER TO gonzalo;
Ok that's a GET client, but we also want a POST client to do something like this:
select post('http://localhost:8080', '{"name": "Gonzalo"}'::json)->'hello';
As you can see I want to use application/json instead of application/x-www-form-urlencoded to send request parameters. I wrote about it here time ago. So I will create one endpoint within my Silex server to handle my POST requests to:
<?php include __DIR__ . '/../vendor/autoload.php'; use Silex\Application; use Symfony\Component\HttpFoundation\Request; use G\AngularPostRequestServiceProvider; $app = new Application(['debug' => true]); $app->register(new AngularPostRequestServiceProvider()); $app->post('/', function (Application $app, Request $request) { return $app->json(['hello' => $request->get('name')]); }); $app->get('/', function (Application $app, Request $request) { return $app->json(['hello' => $request->get('name')]); }); $app->run();
And now we only need to create one stored procedure to send POST requests
CREATE OR REPLACE FUNCTION post( uri character varying, paramenters json) RETURNS json AS $BODY$ import urllib2 clen = len(paramenters) req = urllib2.Request(uri, paramenters, {'Content-Type': 'application/json', 'Content-Length': clen}) f = urllib2.urlopen(req) return f.read() $BODY$ LANGUAGE plpython2u VOLATILE COST 100; ALTER FUNCTION post(character varying, json) OWNER TO gonzalo;
And that's all. At least this simple script is exactly what I need.
Generating push notifications with Pushbullet and Silex
Sometimes I need to send push notifications to mobile apps (Android or IOS). It's not difficult. Maybe it's a bit nightmare the first times, but when you understand the process, it's straightforward. Last days I discover a cool service called PushBullet. It allows us to install one client in our Android/IOS or even desktop computer, and send push notifications between them.
Pushbullet also has a good API, and it allows us to automate our push notifications. I've play a little bit with the API and my Raspberry Pi – home server. It's really simple to integrate the API with our Silex backend and send push notifications to our registered devices.
I've created one small service provider to enclose the API. The idea is to use one Silex application like this
use Silex\Application; use PushSilex\Silex\Provider\PushbulletServiceProvider; $app = new Application(['debug' => true]); $myToken = include(__DIR__ . '/../conf/token.php'); $app->register(new PushbulletServiceProvider($myToken)); $app->get("/", function () { return "Usage: GET /note/{title}/{body}"; }); $app->get("/note/{title}/{body}", function (Application $app, $title, $body) { return $app->json($app['pushbullet.note']($title, $body)); }); $app->run();
As we can see we're using one service providers called PushbulletServiceProvider. This service provides us 'pushbullet.note' and allows to send push notifications. We only need to configure our Service Provider with our Pushbulled's token and that's all.
<?php namespace PushSilex\Silex\Provider; use Silex\ServiceProviderInterface; use Silex\Application; class PushbulletServiceProvider implements ServiceProviderInterface { private $accessToken; const URI = 'https://api.pushbullet.com/v2/pushes'; const NOTE = 'note'; public function __construct($accessToken) { $this->accessToken = $accessToken; } public function register(Application $app) { $app['pushbullet.note'] = $app->protect(function ($title, $body) { return $this->push(self::NOTE, $title, $body); }); } private function push($type, $title, $body) { $data = [ 'type' => $type, 'title' => $title, 'body' => $body, ]; $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => self::URI, CURLOPT_HTTPHEADER => ['Content-Type' => 'application/json'], CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => $this->accessToken . ':', CURLOPT_RETURNTRANSFER => true ]); $out = curl_exec($ch); curl_close($ch); return json_decode($out); } public function boot(Application $app) { } }
Normally I use Guzzle to handle HTTP clients, but in this example I've created a raw curl connection.
You can see the project in my github account
Microservice container with Guzzle
This days I'm reading about Microservices. The idea is great. Instead of building a monolithic script using one language/framowork. We create isolated services and we build our application using those services (speaking HTTP between services and application).
That's means we'll have several microservices and we need to use them, and maybe sometimes change one service with another one. In this post I want to build one small container to handle those microservices. Similar idea than Dependency Injection Containers.
As we're going to speak HTTP, we need a HTTP client. We can build one using curl, but in PHP world we have Guzzle, a great HTTP client library. In fact Guzzle has something similar than the idea of this post: Guzzle services, but I want something more siple.
Imagine we have different services:
One Silex service (PHP + Silex)
use Silex\Application; $app = new Application(); $app->get('/hello/{username}', function($username) { return "Hello {$username} from silex service"; }); $app->run();
Another PHP service. This one using Slim framework
use Slim\Slim; $app = new Slim(); $app->get('/hello/:username', function ($username) { echo "Hello {$username} from slim service"; }); $app->run();
And finally one Python service using Flask framework
from flask import Flask, jsonify app = Flask(__name__) @app.route('/hello/<username>') def show_user_profile(username): return "Hello %s from flask service" % username if __name__ == "__main__": app.run(debug=True, host='0.0.0.0', port=5000)
Now, with our simple container we can use one service or another
use Symfony\Component\Config\FileLocator; use MSIC\Loader\YamlFileLoader; use MSIC\Container; $container = new Container(); $ymlLoader = new YamlFileLoader($container, new FileLocator(__DIR__)); $ymlLoader->load('container.yml'); echo $container->getService('flaskServer')->get('/hello/Gonzalo')->getBody() . "\n"; echo $container->getService('silexServer')->get('/hello/Gonzalo')->getBody() . "\n"; echo $container->getService('slimServer')->get('/hello/Gonzalo')->getBody() . "\n";
And that's all. You can see the project in my github account.


text:
Limited Edition 2017 Jersey
| Limited Edition 2017 Jersey |
The 2017 Oceanway Ride Jersey design is a representation of this iconic cycling event on the beautiful Gold Coast.
Join the Oceanway Ride cycling community for updates
2016 Recap Oceanway Ride
| 2016 Recap Oceanway Ride |
2017 Galleries
| 2017 Galleries |
What Others Are Saying About OWR
| What Others Are Saying About OWR |
What an opportunity for you all to enjoy the day on a bicycle in idyllic conditions and as family on Father's Day weekend. Or, just get out and ride and find the wonderful feeling of freedom as you pedal along one of the most beautiful areas in the World.Phil Liggett
With a strong emphasis on fun, Oceanway Ride has been strategically designed to encapsulate and showcase the Gold Coast's most precious commodity, whilst bringing together family and friends and raising money for Mates 4 Mates.Kate Riley
The iconic Surfers Paradise is the perfect hub for this event and a starting point to explore the Gold Coast and all that people fall in love with here.Mike Winlaw
The Ultimate Ride presented by Staminade allows you to experience the spectacular coastline of the Gold Coast in one of the best ways, by being active and riding your bike!Lance Robey


text:
Select a Class
One, Two, Three, Go!We want, we want, Gymbo! Dalton and I started Gymboree when he was 10 months old and in level 2. That first class he clung to me and cried, while I watched other children giggling and playing with balls and scarves and bells. Another mama, who I am still friends with today, told me her son did the same thing. "Don't worry", she said, "Next class he will love it". Well, she was right; and that was the beginning of the next two years of Gymboree filled days, songs, and friendships. Dalton took his first few steps at Gymboree with the applause of the other mamas, said some of his first words there, including "Gymbo", and first learned how to be a friend.
As Dalton grew older and became more rambunctious, Gymboree was a place of no "nos". He could play, sing, climb, and be silly to his hearts content without getting into trouble. It was a safe haven from timeouts, and a time out of our busy life for mama and baby to spend quality time together and create long lasting memories.
When Dalton was 2.5 years, and was in level 6, his baby sister came along. I knew I would need a break from Gymboree to find my new rhythm with two young kids at home. During our last few weeks at Gymboree, I was the one who cried. During the Gymbo dance, as Dalton was thrown in the air, swung from side to side, and hugged and kissed, I knew that the special memories that Gymboree had helped us create would last forever. Now, finally, two years later I am ready to start Gymboree again, this time with my daughter. And let me tell you, I am so excited!
Class Type: Play & Learn 6 (28-36 months)
City: Portland
State: Oregon


text:
Win 1 of 8 Prizes from Gold Seal
September 21, 2013 | Contests
Gold Seal wants to help make your life a little bit easier, which is why they are holding a contest to give away eight different prizes to do just that! Like their Facebook page for the chance to win chauffeur service for a year, a girls' night out, and even a year's worth of house cleaning by a professional!
As much as I would love to be chauffeured around all year, Merry Maids house cleaning would definitely make my family's life easier!
**This contest is not available in Quebec.


text:
Hispanicize Event
Los Angeles, California
Katherine is partner of Hispanicize and an organizer of the event. She oversees all logistics, speaker relations and the execution and delivery of client projects.
Prior to joining Hispanicize, Katherine held positions with Fleishman-Hillard as an account executive, at Newlink Group working with LATAM clients and crisis communications and was previously a producer for the PBS show, Nightly Business Report. Katherine's passion for community building, storytelling and the Latino culture drives her innovative approach to social networking both on and offline.


text:
Doing my best to get this BBB thing correct for my pool this year. Very helpful site here and I learned a lot about CYA/Chlorine relationship. Also learned a bit about the Calcium saturation index and ll of the little things that affect it, (pH, TA, CH....)
One question though, do you folks never add a weekly algecide like ALL-60 or "Pool Perfect/Phos free" or monthly does of scale/stain free? No weekly maintenance products?


text:
Medical center tree is lit to remember loved ones
Published 6:00 pm, Monday, December 4, 2006
The hospital's first annual Remembrance Tree's 145 lights burst into color Monday afternoon during a lighting ceremony at CRMC.
Purchased by hospital employees, volunteers and area residents, each colored light symbolizes a loved one who is being honored and each white light symbolizes a loved one who has died, according to Meredith Sharp, the center's director of volunteers.
Nurse Lilibeth Williams bought lights for her deceased parents to remember the good times she shared with them during the holidays.
"It symbolizes the memory of the life they had while they were still here and the traditions that they passed on to our generation," Williams said.
Rehabilitation technician Joanne Harwell bought lights for her father, two uncles, niece and grandmother, who have all died. As a practicing Catholic, the lights on the Christmas tree are similar to lighting a candle at mass, Harwell said.
"It's like I'm keeping the memory of them alive when the tree is lit," Harwell said. "I think it's a wonderful thing for the hospital to do at Christmas time."
Nearby, taped to a an office window, is a paper Christmas tree with construction paper decorations that have names of people being remembered written on them. One of the names is Joyce Conley, a former Auxiliary of Conroe Regional Medical Center volunteer who lost her battle to cancer last year.
"It's just nice to think of her," said Millie Whaley, the auxiliary's next president. "She was a sweet lady who dedicated years as a volunteer."
Whaley and fellow auxiliary volunteer Margie Phillips each bought a light for their husbands as well.
The money raised from the purchased lights will help the auxiliary offer scholarships to future doctors and nurses, Phillips said. This year, the auxiliary gave $47,000 in scholarships to 12 students who graduated from Montgomery County high schools in the spring.
The Remembrance Tree is just one of many fund-raisers the auxiliary's approximately 160 members hold to raise money for the scholarships.
"I hope that we have started a tradition with this tree," Sharp said. "It's kind of neat how each light represents a person's life."
The Auxiliary of Conroe Regional Medical Center is open to anyone who is willing to contribute four hours a week to volunteer at the hospital. Volunteer duties include filing documents and working the counter at the gift shop. For more information, call (936) 539-7433 or visit www.conroeregional.com.
Lucretia Fernandez can be reached at firstname.lastname@example.com.


text:
Unfortunately overhangs there are hard and i struggled on several climbs - but that is the way of climbing. Notice the new and toxic, homemade African chalk bag, with that the forthcoming roof is no problem!
In Terradets we planned to conquer Los Colores, but finished on a neighboring, painfull and unprotected line. We did toprope the last 6a and finished by the 6b+ of Colores, but I have had better...and warmer days in Terradets.


text:
KPMG's confidence: Regulation will never force audit split
KPMG global head Michael Andrew claims the firm will duck EU regulation forcing firms to split audit and consulting services
KPMG global head Michael Andrew claims the firm will duck EU regulation forcing firms to split audit and consulting services
REGULATION will never force KPMG to split its audit and consultancy service provision, according to international chairman Michael Andrew.
Andrew also used fighting words to dismiss the European Commission's joint audit proposal and attacked the draft reform paper for "creating an environment of uncertainty".
He told the Financial Times, "We will be a multi-disciplinary firm no matter what the regulatory environment will be," and said "second-tier firms … simply don't have the skills or the market expertise" to audit global banks.
Apparently determined to further aggravate his smaller peers, Andrew (left) said some are "quite lazy" when it comes to investing in their business, adding: "Can you imagine a second-tier firm auditing a global bank at a time when there is already a lack of confidence in the marketplace?"
The mid-tier, unsurprisingly, can.
RSM Tenon's Andy Raynor recently told Accountancy Age joint audits would be "best and most palatable" for clients, saying teaming up would provide a "fresh pair of eyes" and dismissing fears of lower-quality audits.
"The issue here is efficient management. If joint audits are done properly, there is no greater likelihood of problems than in an audit carried out by one firm across multiple offices," he concluded.
It is unclear how Andrew plans to brush aside the Commission's diktats. A threshold for splitting audit and non-audit services would allow firms to rake in up to €1.5bn (£1.3bn) a year in major audit fees, and the KPMG boss might view this threshold as his get-out-of jail card.
The fighting words could also be testament to Big Four confidence that the proposals in their current form will never enter into law.
Experts agree that, while radical, the leaked draft reform paper is far from finalised, and the Council of Ministers and European Parliament stand between it and EU-wide adoption.
PwC's Richard Sexton said it is "frankly premature" to predict the outcome of Brussels' deliberations, but agreed the value of multi-disciplinary firms is "way underestimated".
Andrew did not go into detail on how he hopes the dodge the regulatory bullet, and a UK spokesman was reluctant to speculate. "This statement indicates our intention and our priority to remain a multi-disciplinary firm," he said.
The spokesman said it would be "premature to be more specific" on Andrew's thinking. It was not, apparently, premature for the global boss to make the bold statement in the first place.


text:
Posted the radical left song lyrics to Dark Chomsky, a speech R·E-mix song I created, a long time back.
FYI -- I don't just sample the speech & go w/it, I totally re-phrase most of the speaker's sentences. If I didn't have backing music, you can hear much more clearly the awkward way the sentences sound. Funny that the music 'flattens' the speech to sound more natural.
I made a myspace.com musician account, R·E (aka myspace.com\realityenhancer), which is now online, and it's cool b/c it just starts streaming a random song.
It wasn't that difficult to setup, so if any other musical types are posting tracks, please post them? I'd like to hear what you're doing?
I remember the rap trio, Javan, A, and Sam, that was around for awhile. Anything go anywhere w/that? No mp3's to post online, just for kicks? :D