After leaving clearcubic.com infrastructure alone for several years, I finally took some time to bring it more up-to-date.
* Updgraded Django 1.4 to Django 1.5. Django's latest version is actually 1.8. But 1.5 is the latest that Google app supports. :(
* Replaced jQuery Mobile with Foundation 5.
* Upgraded Photoswipe version 3 to 4.
* Added Angular.js (only some parts of the sites were converted to this.)
clearcubic.com blog
A blog on mostly clearcubic.com photos.
2015-04-28
clearcubic.com backend update
Posted by
Caber
at
10:53 PM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels:
misc
2012-06-08
clearcubic.com backend updates
Previously, Google app engine (GAE) only allowed for Python 2.5. Some time in February, 2012, Google finally added support for Python 2.7. Along with the latest version of Python 2, official support for newer versions (1.2 and 1.3) of the Django framework were also added.
Since the Python 2 branch is pretty much at its end-of-life stage, I wanted to move clearcubic.com's code to the latest version of Python supported by GAE and as of today, clearcubic.com is using Python 2.7 and Django 1.3.
Besides the backend changes, there is one small user noticeable change that I made. When viewing full size photos in albums, the largest available resolution for the photos is now shown instead of the previously set smaller fixed resolution.
Since the Python 2 branch is pretty much at its end-of-life stage, I wanted to move clearcubic.com's code to the latest version of Python supported by GAE and as of today, clearcubic.com is using Python 2.7 and Django 1.3.
Besides the backend changes, there is one small user noticeable change that I made. When viewing full size photos in albums, the largest available resolution for the photos is now shown instead of the previously set smaller fixed resolution.
Posted by
Caber
at
12:45 AM
2
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels:
misc
2012-06-06
MS SQL job monitor
At my job, we run many MS SQL jobs for crunching data. And on rare occasionally, we'll see jobs that would get stuck in its running state for unknown reasons. Since we do not have external softwares to monitor the SQL jobs and I do not wish to check the job results daily, I created a solution that would allow us to at least know whether a job has exceeded its expected run time. That way, I can just go and check that specific job and if I feel that it's indeed stuck, I can stop and restart it.
My solution was another SQL job that would monitor the specified job. :) I know what you are thinking, what if the job that monitors the other job hangs? Well, I do worry about that as well but I'm hoping these monitor jobs are simple enough that they will not hang (the jobs that got stuck have been complex and usually long running.)
How does my solution work? I created a stored procedure that takes in name of the job to monitor and the expected duration as parameters. As a first step of the job that I want to monitor, I would call this stored procedure and a new job would get created. The newly created job's only task is to check whether the job specified in the parameter is still running after the specified duration starting from the time that it was created. And if the specified job exceeds the specified duration, I send an email out to notify the developers in our team.
When I was searching for a solution on the internet to our job hanging problem, I didn't find too many things. That's why I thought it might be helpful if I post my source code out there for other people to use.
The source code is on github.com. A link is also provided on the clearcubic.com projects page.
My solution was another SQL job that would monitor the specified job. :) I know what you are thinking, what if the job that monitors the other job hangs? Well, I do worry about that as well but I'm hoping these monitor jobs are simple enough that they will not hang (the jobs that got stuck have been complex and usually long running.)
How does my solution work? I created a stored procedure that takes in name of the job to monitor and the expected duration as parameters. As a first step of the job that I want to monitor, I would call this stored procedure and a new job would get created. The newly created job's only task is to check whether the job specified in the parameter is still running after the specified duration starting from the time that it was created. And if the specified job exceeds the specified duration, I send an email out to notify the developers in our team.
When I was searching for a solution on the internet to our job hanging problem, I didn't find too many things. That's why I thought it might be helpful if I post my source code out there for other people to use.
The source code is on github.com. A link is also provided on the clearcubic.com projects page.
Posted by
Caber
at
12:30 PM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels:
misc,
MS SQL,
technology
2012-05-28
Taiwan 2012
Two years, that's how long it has been since the last time we went back to Taiwan and Joy has been longing to go back to visit her families, friends and enjoying all the delicious food that Taiwan has to offer. So it was decided months ago that we, including my parents, would fly back on 4/12 and stay there for two weeks.
Since this is the first time that we are taking both Cadi and Cody on a long trip together, we didn't know what to expect.
Cadi and Cody both loved the airport. It's got so much room for them to run around and so many things to see. For the plane rides, even though Cadi has experienced it once, but she she was only a couple months old back then and we weren't sure how she would handle it this time. Fortunately, Cadi and Cody handled it pretty well. In fact, Cadi didn't cry at all on the plane; I was definitely surprised by that. Cody gave us a little bit more trouble but that was mostly due to us restraining him from running on the plane, lying on the floor and kicking the back of other passengers' seats. There's the difference between a boy and a girl.
After we landed at Taiwan, since my parents weren't staying at the same place as we were, Cadi and Cody were left with just Joy and myself. Because our arrival time was pretty late, the originally plan was to call taxi to take us to Taipei. But Joy's friend, 林燕芳, her husband and son, made a surprise appearance. (Thank you guys so much.)
When we arrived at Joy's parents' place, as expected, Cadi and Cody went into defensive mode. For the next two weeks, Cadi pretty much will only stick to her mommy and as a result, I had to take Cody.
The weather of Taiwan's April felt warm and humid to me and it got warmer and more humid the further south we went. I'm glad it wasn't the hottest month in Taiwan and I was able to have 75% of my appetite intact. However, since I was the one taking care of Cody, it meant I could not have eaten as much as I could have without the children. :)
At this time, I would like to thank a couple more of Joy's friends. First up, 李俊宏 and his wife. They drove us around the town to have lots and lots of good eats...several times throughout the two weeks. Without them, our taste buds would have suffered greatly. Second, 吳美鈴 and her husband 顏永文 for arranging and taking us on a two day sight-seeing road trip of Kaohsiung. While we were still in NY, when Joy told me that we would be going to Kaohsiung to sight-seeing, I was like "What? Where can we go and what can we do in Kaohsiung for two days?" Well, that road trip turned out to be a very good one. Since I grew up in Kaohsiung, the Kaohsiung as I know it has definitely changed a lot. Ever since I came to NY 20+ years ago, I've never really gone back to visit Kaohsiung (other than the "Love River"), so I should have expected it.
Another road trip we took this time was to Tainan. We were planning to go somewhere else previously but Joy's mom thought it would be a good idea to visit Joy's grandparent in Tainan, that's how this came about. Joy's brother was the one who drove us there and back to Taipei. He took a couple days off from his work in China and went back to Taiwan to see us. Thank you, Ray.
Because my parents take care of Cadi in NY, so Cadi's pretty good with them. However, when we visited my grandparent's (mother's side) house in Kaohsiung and met up with my mom, Cadi would still cling to Joy and would cry/scream if my mom tried to do certain things with her such as giving Cadi a bath. However, when we got to my parent's house at Pingtung the next day along with my mom, Cadi became at ease once again with my parents. So I'm not sure what happened to Cadi when we were at Kaohsiung.
So, did Cadi ever open up herself to Joy's parents or sister? She did, on the day prior to the one we leave Taiwan, to Joy's mom and sister. That was only an illusion though. After only a couple hours of sleep that night and being waken up to go to the airport early in the morning, Cadi seemed to have forgotten all about it the next day.
Cadi's almost 3 and before the trip, Joy was thinking of potty train Cadi this year when summer arrives. After we come back to NY, a couple of days later, Cadi became 90% potty trained all of a sudden pretty much on her own. And as of 5/28/2012, Cadi is mostly without diapers except at night when she sleeps and when we are going out. She doesn't speak English yet but we are hoping to start teaching her soon. Not really sure what's the best way though.
And for Cody, he's going to be 2 in four more months. I believe he has finally got his drooling under control. He still doesn't speak too much and still can't seem to speak two different Chinese words together. He really likes to follow his sister around nowadays. Wherever Cadi goes, Cody wants to go too. And if you don't let him, he'll start complain by crying.
Since my Nikon D70 was already broken before we went back to Taiwan, the only camera that we have left is the Canon S95 point-and-shoot and that's what I used for the entire trip. At times, I really missed having a DSLR as it was very difficult to capture low-light and action photos using the point-and-shoot.
When we were near Tainan, we stopped by a bird watching place by chance. And next to the main road is a ditch with lots of small crabs. Here, Joy's father is looking for one to show Cadi and Cody. And yes, he did catch one.
At the "Salt Mountain", the place was selling lots of food with salt added. Egg, coffe, popsicle, etc. We let Cadi have a popsicle all on her own since it was so hot in Tainan.
Cadi helping Cody wiping ice-cream off his face.
Joy's grandpa had a store selling Chinese herbal medicines. Now it's Joy's cousin that runs it from day to day. When Joy's cousin took out dried goji berries to put in medicine packs, Cadi and Cody tried them and liked them immediately. When Joy's father heard about it, he got a bag full of the dried goji and gave to the grandchildren as snacks.
Garlics. I'm guessing this is the stage before they are sold on the market?
The room that we slept at while in Joy's parents' house. The children and Joy sleep on the mattress and I sleep on the wooden bed surface. The sacrifice a father makes. :)
My first time at this night market called Snake Alley (華西街夜市). If you know the Taiwanese film, Monga, this is one of the many places that the film took place. It's certainly different than other night markets because it's got a few expensive full restaurants.
As I mentioned, Cadi would not let most people hug her during this trip, this is one of those rare exceptions.
Joy's friend took us to this place that only sells pork sausages (shown in the photo) and one type of noodle. When we got there, I think there were only 4 pork sausages left. We bought them all. They were good...but I'm not sure how good if compared to other places.
I think some one promised Cadi to buy her an umbrella and Cadi would not stop asking about it until she actually got one. She picked out a yellow SpongeBob.
We went to Taoyuan for a day and stayed at Joy's friend's house. This was around 6 am, and we were preparing to take Taiwan high speed rail to go to Kaohsiung.
The boy behind us is the son of Joy's friends. While his parents are next to us, he liked tagging along with our family instead. On the high speed rail, he constantly wanted to sit with us and you'll notice that he showed up in quite a few of our family photos. So, naturally, we called him our "older son".
When his parents told him to sit down next to them, he wasn't too happy about it.
I like this photo. The wall says Kaohsiung Museum of Labor but that's only for that building. I don't remember the name of that area but it was a nice location. Seemed to have to lots of interesting stuff to look at and lots of photo opportunities.
Unlike Cadi, Cody weren't as resistent to letting strangers hug him. It was a good thing because that meant I get to relax a bit.
Everyone on the Kaohsiung trip except Cody and I. I was holding the passed out Cody in my arms when I took this photo.
And another early am photo taken in the hotel in Kaohsiung. We didn't come back to our room until close to 11pm the night before. :)
This seemingly simple food is really tasty (at least to me). it was from Pingtung.
Got to see Han, Ophelia and their new born daughter. Can you tell that they are a family from this photo?
When the children were still rather afraid of their grandpa after a couple of few days, grandpa decided to use his secret weapon, balloons. They worked wonders.
Cody willing to let his grandma giving him a bath.
And Cody strike a happy pose after the bath.
Not sure what got into Cadi. On the night before we leave Taiwan, this is what Cadi did to feed her aunt.
Since this is the first time that we are taking both Cadi and Cody on a long trip together, we didn't know what to expect.
Cadi and Cody both loved the airport. It's got so much room for them to run around and so many things to see. For the plane rides, even though Cadi has experienced it once, but she she was only a couple months old back then and we weren't sure how she would handle it this time. Fortunately, Cadi and Cody handled it pretty well. In fact, Cadi didn't cry at all on the plane; I was definitely surprised by that. Cody gave us a little bit more trouble but that was mostly due to us restraining him from running on the plane, lying on the floor and kicking the back of other passengers' seats. There's the difference between a boy and a girl.
After we landed at Taiwan, since my parents weren't staying at the same place as we were, Cadi and Cody were left with just Joy and myself. Because our arrival time was pretty late, the originally plan was to call taxi to take us to Taipei. But Joy's friend, 林燕芳, her husband and son, made a surprise appearance. (Thank you guys so much.)
When we arrived at Joy's parents' place, as expected, Cadi and Cody went into defensive mode. For the next two weeks, Cadi pretty much will only stick to her mommy and as a result, I had to take Cody.
The weather of Taiwan's April felt warm and humid to me and it got warmer and more humid the further south we went. I'm glad it wasn't the hottest month in Taiwan and I was able to have 75% of my appetite intact. However, since I was the one taking care of Cody, it meant I could not have eaten as much as I could have without the children. :)
At this time, I would like to thank a couple more of Joy's friends. First up, 李俊宏 and his wife. They drove us around the town to have lots and lots of good eats...several times throughout the two weeks. Without them, our taste buds would have suffered greatly. Second, 吳美鈴 and her husband 顏永文 for arranging and taking us on a two day sight-seeing road trip of Kaohsiung. While we were still in NY, when Joy told me that we would be going to Kaohsiung to sight-seeing, I was like "What? Where can we go and what can we do in Kaohsiung for two days?" Well, that road trip turned out to be a very good one. Since I grew up in Kaohsiung, the Kaohsiung as I know it has definitely changed a lot. Ever since I came to NY 20+ years ago, I've never really gone back to visit Kaohsiung (other than the "Love River"), so I should have expected it.
Another road trip we took this time was to Tainan. We were planning to go somewhere else previously but Joy's mom thought it would be a good idea to visit Joy's grandparent in Tainan, that's how this came about. Joy's brother was the one who drove us there and back to Taipei. He took a couple days off from his work in China and went back to Taiwan to see us. Thank you, Ray.
Because my parents take care of Cadi in NY, so Cadi's pretty good with them. However, when we visited my grandparent's (mother's side) house in Kaohsiung and met up with my mom, Cadi would still cling to Joy and would cry/scream if my mom tried to do certain things with her such as giving Cadi a bath. However, when we got to my parent's house at Pingtung the next day along with my mom, Cadi became at ease once again with my parents. So I'm not sure what happened to Cadi when we were at Kaohsiung.
So, did Cadi ever open up herself to Joy's parents or sister? She did, on the day prior to the one we leave Taiwan, to Joy's mom and sister. That was only an illusion though. After only a couple hours of sleep that night and being waken up to go to the airport early in the morning, Cadi seemed to have forgotten all about it the next day.
Cadi's almost 3 and before the trip, Joy was thinking of potty train Cadi this year when summer arrives. After we come back to NY, a couple of days later, Cadi became 90% potty trained all of a sudden pretty much on her own. And as of 5/28/2012, Cadi is mostly without diapers except at night when she sleeps and when we are going out. She doesn't speak English yet but we are hoping to start teaching her soon. Not really sure what's the best way though.
And for Cody, he's going to be 2 in four more months. I believe he has finally got his drooling under control. He still doesn't speak too much and still can't seem to speak two different Chinese words together. He really likes to follow his sister around nowadays. Wherever Cadi goes, Cody wants to go too. And if you don't let him, he'll start complain by crying.
Since my Nikon D70 was already broken before we went back to Taiwan, the only camera that we have left is the Canon S95 point-and-shoot and that's what I used for the entire trip. At times, I really missed having a DSLR as it was very difficult to capture low-light and action photos using the point-and-shoot.
When we were near Tainan, we stopped by a bird watching place by chance. And next to the main road is a ditch with lots of small crabs. Here, Joy's father is looking for one to show Cadi and Cody. And yes, he did catch one.
At the "Salt Mountain", the place was selling lots of food with salt added. Egg, coffe, popsicle, etc. We let Cadi have a popsicle all on her own since it was so hot in Tainan.
Cadi helping Cody wiping ice-cream off his face.
Joy's grandpa had a store selling Chinese herbal medicines. Now it's Joy's cousin that runs it from day to day. When Joy's cousin took out dried goji berries to put in medicine packs, Cadi and Cody tried them and liked them immediately. When Joy's father heard about it, he got a bag full of the dried goji and gave to the grandchildren as snacks.
Garlics. I'm guessing this is the stage before they are sold on the market?
The room that we slept at while in Joy's parents' house. The children and Joy sleep on the mattress and I sleep on the wooden bed surface. The sacrifice a father makes. :)
My first time at this night market called Snake Alley (華西街夜市). If you know the Taiwanese film, Monga, this is one of the many places that the film took place. It's certainly different than other night markets because it's got a few expensive full restaurants.
As I mentioned, Cadi would not let most people hug her during this trip, this is one of those rare exceptions.
Joy's friend took us to this place that only sells pork sausages (shown in the photo) and one type of noodle. When we got there, I think there were only 4 pork sausages left. We bought them all. They were good...but I'm not sure how good if compared to other places.
I think some one promised Cadi to buy her an umbrella and Cadi would not stop asking about it until she actually got one. She picked out a yellow SpongeBob.
We went to Taoyuan for a day and stayed at Joy's friend's house. This was around 6 am, and we were preparing to take Taiwan high speed rail to go to Kaohsiung.
The boy behind us is the son of Joy's friends. While his parents are next to us, he liked tagging along with our family instead. On the high speed rail, he constantly wanted to sit with us and you'll notice that he showed up in quite a few of our family photos. So, naturally, we called him our "older son".
When his parents told him to sit down next to them, he wasn't too happy about it.
I like this photo. The wall says Kaohsiung Museum of Labor but that's only for that building. I don't remember the name of that area but it was a nice location. Seemed to have to lots of interesting stuff to look at and lots of photo opportunities.
Unlike Cadi, Cody weren't as resistent to letting strangers hug him. It was a good thing because that meant I get to relax a bit.
Everyone on the Kaohsiung trip except Cody and I. I was holding the passed out Cody in my arms when I took this photo.
And another early am photo taken in the hotel in Kaohsiung. We didn't come back to our room until close to 11pm the night before. :)
This seemingly simple food is really tasty (at least to me). it was from Pingtung.
Got to see Han, Ophelia and their new born daughter. Can you tell that they are a family from this photo?
When the children were still rather afraid of their grandpa after a couple of few days, grandpa decided to use his secret weapon, balloons. They worked wonders.
Cody willing to let his grandma giving him a bath.
And Cody strike a happy pose after the bath.
Not sure what got into Cadi. On the night before we leave Taiwan, this is what Cadi did to feed her aunt.
Posted by
Caber
at
10:00 AM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
2012-03-27
2011 Cancer Walk @ Central Park
It's been a few years since we've gone to a cancer walk with the NYYAD. Now that Cadi is able to walk by herself, we thought it would be fun to take Cadi to go for a walk. If Cody goes too, it would be too much "fun" for us, so we decided to leave him at home.
Because we woke up late in the morning, we met up with the members of NYYAD about half way of the cancer walk route. So for the actual cancer walk, we actually didnt do that much. However, we did do a lot of walking afterward.
Cadi preparing to leave the house.
Cadi enjoying some snack and drink after she crossed the goal line.
Cadi and a few members of the NYYAD.
During lunch, Cadi pretending Karin isn't around her.
Posted by
Caber
at
10:47 PM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
2012-03-18
My Nikon D70 with "Err"
On 2/20/2012 (President's Day), I gave my D70 camera to Cadi to play. After only a short while, she gave it back to me. I thought to myself, "Well, that was quick", and I just put the camera away. The next day, when I tried to take a picture with it, I realized why Cadi gave it back to me so quickly. It's because the camera can no longer take a picture. When the shutter button is pressed, only an "ERR" message is displayed and nothing happens. So my plan to let my children break the camera for me finally worked. Now I have a "reason" of getting a new one. Hooray!
My camera with the "Err" message when the shutter button is pressed. Sad and happy at the same time.
My camera with the "Err" message when the shutter button is pressed. Sad and happy at the same time.
Posted by
Caber
at
9:39 PM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
2012-02-10
2011 Oyster Festival @ Oyster Bay
Sometime in Oct. 2011, our friends were planning to go to the Oyster Festival @ Oyster Bay and asked us if we wanted to go too. Since I've never been to one, I thought it would be interesting to take the children out to check it out. Because the festival turned out to be pretty big and because the weather was great on that day, that made our first time experience a positive one.
Because the line for raw oysters was too long, we got raw clams instead. We did get some other food before that but those were a meh. ALthough that was probably due to us being hungry and didn't want to wait for long lines for anything at the time.
When my sister heard that we are planning to go to the Oyster Festival, she said her friend said that it's a small festival so I wasn't expecting a whole lot of people. When we got there, the place is packed and it wasn't small. Her friend must be talking about a different location or something.
From left to right, Kyleen, Cody and Cadi.
When we left the festival, we stopped by an ice cream store opened by our friends' friend. The children loved it of course. Cody didn't get any though. He fell asleep. :)
Because the line for raw oysters was too long, we got raw clams instead. We did get some other food before that but those were a meh. ALthough that was probably due to us being hungry and didn't want to wait for long lines for anything at the time.
When my sister heard that we are planning to go to the Oyster Festival, she said her friend said that it's a small festival so I wasn't expecting a whole lot of people. When we got there, the place is packed and it wasn't small. Her friend must be talking about a different location or something.
From left to right, Kyleen, Cody and Cadi.
When we left the festival, we stopped by an ice cream store opened by our friends' friend. The children loved it of course. Cody didn't get any though. He fell asleep. :)
Posted by
Caber
at
12:58 AM
0
comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels:
photo
Subscribe to:
Posts (Atom)