RSS
 

Applescript to mount Samba (smb) shares

14 Mar

I have the following apple script to mount samba shares from a Linux Samba server to the Mac OS Sierra

repeat with i from 1 to 5
    try
        do shell script "ping -o -t 2 server.ip.address"
        exit repeat
    on error
        delay 5
        if i = 5 then error number -128
    end try
end repeat

tell application "Finder"
    
    try
        
        mount volume "smb://username@server/sharae1"
        mount volume "smb://username@server/sharae2"
    end try
    
end tell

The reason i'm pinging the server is because the network is slow to start on the Mac. If yours is fast just remove that part.

 

I found the Script Editor in Applications/Utilities. Save the script then Export it as Application. I did not select any other options.

 

I am running the Samba 3.6.25 version installed via brew.

 

 
0 comments

Posted ed_mann in Computers & Technology

 

Beekeeping accident insurance report

24 Feb

Dear State Farm Claim Adjustor:

I'm writing in response to your request for additional information concerning my beekeeping accident. Please notice that in block #3 of the accident report form I wrote "trying to do the job alone" as the cause for my accident. You said in your letter that I should explain more fully, and I trust that the following information will be sufficient. I am a hobbyist beekeeper living in the heart of my city. The only place I can keep my hives is on the top of the six-story apartment house where I live.

When I harvest honey I am not allowed to carry it on the elevator or down the stairs becasue I never seem to be able to get all the bees off of the combs. Besides, dripping sticky honey down six flights of stairs creates an ant problem. So I designed an ingenious method, utilizing a pulley mounted at the edge of the roof, and a rope attached to a platform that enables me to lower the heavy honey supers to the ground so they can be taken to a friends house where there is extracting equipment. This past year my hives produced far more honey than usual so I had a bountiful crop to harvest.

On the date of the accident, I was working alone on the roof of this six-story building. I first secured the rope at ground level, then I went up to the roof and harvested eight supers of honey that weighed a total of 600 pounds. I moved the platform over the edge and carefully stacked the supers on it. Then I went back to the ground and untied the rope, holding it tightly to ensure a slow descent of the 600 pounds of honey supers. Now, you will note in block #2 of your accident report form that I weigh 250 pounds.

Due to my surprise at being jerked off the ground so suddenly, I forgot to let go of the rope. Needless to say, I proceeded at a rapid rate up the side of the building! In the vicinity of the third floor, I met the platform coming down...this explains the fractured skull and broken collarbone. Slowed only slightly, I continued my rapid acsent, not stopping until the fingers of my right hand were buried four knuckles deep in the pulley. Fortunately, by the time I had regained my prescence of mind, I was able to hold tightly to the rope in spite of my great pain.

At approximately the same time, however, the platform of honey hit the ground and the honey supers fell off. Devoid of the weight of the honey supers, the platform now weighs approximately 50 pounds. ( I refer you again to my weight in block #2 of the accident report form.) As you can imagine, I began a rapid rate of descent - down the side of the building. Somewhere in the vicinity of the third floor, I again met the platfrom coming up. This accounts for the two fractured ankles and the lacerations of my legs and lower body.

The encounter with the platform slowed me enouh to lessen the injuries I received as I fell onto the scattered pile of honey supers and frames. Fortunately, only three vertabrae were cracked. I am sorry to report that, as I lay there in unbearable pain, my body embedded in the broken, mushed honey combs wet with honey, and unable to sit up, and watching the empty platform six stories above me, I again lost my prescence of mind and let go of the rope. The empty platform, weighing more than the rope, came immediately down upon me, breaking both legs. In the confusion I barely noticed the 50 or so bee stings I received upon the face. That explains my closed eyes and puffy ears. In conclusion, I sincerely hope I have furnished the information you required as to how the accident occured. All because: I was trying to do the job alone.

I found this posted over at reddit.com/r/Beekeeping. I have edited it for my insurance company and approximate weight.

To all my friends, this did not happen to me, i just found this funny and wanted to share it.

 

 
0 comments

Posted ed_mann in My Life

 

I'm still alive!

27 Jun

The reports of my death have been greatly exaggerated. Mark Twain

So i have been really busy and negleting this site. I have been working on this blog code re-write project, and a accounting system, plus a re-write of a Property Management system. Working on learning go-lang and rust-lang.  Also i have started to get into keeping bees. And that is what is keeping me busy. Not to mention my son Simon. I'm trying to be a good dad for him, and want to spend as much time with him as i can. I'm not sure i'm doing a good job. So honey if you are reading this the people don't need your comments. :-D

 

I love my wife, she is awesome. God really blessed me with a incredible woman. I'm doing the best to keep her with me. However if she ever leaves me i'm going with her! And i mean it.

 

Anyway, i'll try to post more interesting stuff. Maybe about the projects i'm working on.

With Rust lang i'm doing a bot for Telegram. It's a Bible bot, so you can send it verses or topics and it will return the verse or verses for the topic. You can also tag verses for reference. It's not up yet, i need to get some db schema issues resolved. However i was able to send a few commands and get lists of the books of the Bible back.

 

With Go-lang trying to build sensor monitor. Which i got a domain for it. However it's not up yet, so i don't need to share that information. It's using mqtt with Apache Artemis  as the messaging system. With the purchase of the domain name i started API for my dns management system. I needed to upgrade it. I wrote  the initial version some 10 years or so ago I think it's been 15 years.

Well that's all for now. I'll post more hopefully before the end of July.

 
0 comments

Posted ed_mann in My Life

 

The Donkey and the Dog

03 Nov

I got this story from a friend at work. Thanks Mark

 

Titled:  Being Indian...

Management Lesson :
One night when the whole world was sleeping, a thief broke into the house of a washer man.
The washer man was fast asleep but the donkey and the dog were awake.
The dog decided not to bark since the master did not take good care of him and wanted to teach him a lesson.
The donkey got worried and said to the dog that if he doesn't bark, the donkey will have to do something himself.
The dog did not change his mind and the donkey started braying loudly.
Hearing the donkey bray, the thief ran away, the master woke up and started beating the donkey for braying in the middle of the night for no reason.
Moral of the story: One must not engage in duties other than his own.

Now take a new look at the same story.
The washer man was like a typical top management corporate guy.
He had the fundas of looking at the bigger picture and thinking out of the box.
He was convinced that there must be some reason for the donkey to bray in the night.
He walked outside a little and did some fact finding, applied a research approach, figured out from the ground realities that there was a thief who broke in and the donkey only wanted to alert him about it.
Looking at the donkey's extra initiative and going beyond the call of the duty, he rewarded him with lot of hay and other perks and the donkey became his favorite pet.
The dog's life didn't change much, except that now the donkey was more motivated in doing the dogs duties as well.
In the Appraisal the dog managed an "8".
The donkey was rated as "9".
Soon the dog realized that the donkey is taking care of his duties and he can enjoy his life sleeping and lazing around.
The donkey had to live up to his already high performance standards.
Soon he was over burdened with work and always under pressure and now is looking for a switch....
Moral of the story-Remains the same- "One must not engage in duties other than his own"

 
0 comments

Posted ed_mann in Stories