Previously I wrote about how to Fix the time zone for DST in israel. Well if you did the free update to OS X 10.9 Mavericks, You’ll noticed that this stopped working.
So for what ever reason the Israeli government decided to change the law and extend Day Light Savings Time, שעון קיץ this year. The should just get rid of DST in my opinion, and I would be willing to bet that many people share that opinion.
Any way this change in DST means that may scripts are making wrong time calculations.
To fix this in PHP, you can use Athens for the time zone in Israel, but that is really hackish. The real fix is to install the new PECL timezone database.
So I have some suggestions to kind of remedy the situation. We’ve all heard of, like, casual Friday thing. How about no talk Thursdays? How about just one Thursday, once a month, and cut that day in half and just say the afternoon - I’ll make it really easy for you - so just silence. That’s it. And what you’ll find is that a tremendous amount of work actually gets done when no one talks to each other.
So I have been having a problem for the last few days. At night I would close my Macbook and put it to sleep and when I would open it again at work in the morning it would be shutdown and boot from scratch, no wake from sleep, and no hibernate. Anything I was working on yesterday was lost. Well not 100% lost because there is this annoying feature that after a crash, osx will open all the programs and windows that you last had open, but that is another story.
I realized that the problem is that my battery is dead, even though it lights up all the little green lights on the side.
My Battery Condition from the menu icon or from Energy Saver preference pane show ”Replace Now”
Replace Now: The battery is functioning normally but holds significantly less charge than it did when it was new. You can continue to use the battery until you replace it without harming your computer.
And if I unplug my Macbook it shuts down almost immediately.
Set Macbook to hibernate instead of sleeping
So I can’t really get a new battery right now so I need a solution in the meantime.
I rarely work away from a power-supply so that isn’t an issue. What I need is to have my computer hibernate immediately when I close it.
This can be set up using
sudo pmset hibernatemode 25.
From the man page:
hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The system will store a copy of memory to persistent storage (the disk), and will remove power to memory. The system will restore from disk image. If you want “hibernation” - slower sleeps, slower wakes, and better battery life, you should use this setting.
See the man page for more info.
Looks like the day has finally come. At work we are going to try out git office wide on one of our largest projects. This is going to be a test to see if the less technically inclined people in the office can get used to it.
For now it looks like we are going to use git-svn so we can switch back to subversions if the changes don’t stick. I have already been using git-svn to work on almost all of our projects, it’s not perfect, but much better than working with svn straight.
I have tried a few different tools, but I always come back to the command line and magit on emacs, needless to say, those tools might not be the best for the general public, so we need to look into some nice gui interfaces.
So far we are trying out 2, Source Tree, and git tortoise.
Source tree is a nice looking cross platform application. I’ve used it a few times. It handles the usually stuff without much issue.
There is a mac and a windows version, so every one in the office can use the same app. The windows version doesn’t seem to support git-svn, so that is going to be a problem, ( the mac version supports it just fine).
It also seems to work well on repositiories that are located on network drives, not the case for other applications that I tried.
This is supposed to be a clone of svn tortoise. Most of the window’s users here use svn tortoise so the interface should be familar, but there is no mac version.
It seems to support git-svn but it doesn’t ask for an authors file, so I don’t know how it plans to mach up users.
Here is a elisp function that I wrote to quickly add doc-blocks to code.
It changes the selected region to the first line of the doc-block so you can change it immediately.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
MySQL does not include a function to split a delimited string. However, it’s very easy to create your own function.
1 2 3 4 5 6 7 8 9
Git is great for starting a project quickly but the office uses svn. Here is how I add my existing git repository to a new svn repo.
1 2 3 4 5 6 7
First thing we do is make the new svn repository.
Then clone into our existing git repository,
Next we checkout the trunk, and rebase our existing work onto it.
Now we move
master to point back to
trunk, and push changed to svn.
When converting time zones with MySql you should use the method
CONVERT_TZ so that it will automatically take into account DST (
Daylight savings time / שעון קיץ )
This will convert a date in New York to our local time.
If you do not use this method and just subtract 7 hours from the time, you will have errors when we switch to and from DST.