你和成功人士的能力其實相差不大

你和成功人士的能力其實相差不大,只是… (1) 你在賴床,他在健身,所以他比你健康 (2) 你應付工作,他用心工作,所以他晉升比你快 (3) 你在完成今天的計劃,他在策劃明年的計劃,所以他比你掌握更多先機 (4) 你在找藉口,他在解決問題,所以他比你事業有成 (5) 你在計算自己利益,他在考慮對方利益,所以他的人脈比你廣泛 (6) 你在消費,他在理財,所以他比你富有 改變,就在這一刻開始!

August 11, 2015 · 1 min · birdchan

jQuery vs React.js

Coming from a jquery background, I really like this article which highlights the strength of React.js. React.js Introduction For People Who Know Just Enough jQuery To Get By

July 13, 2015 · 1 min · birdchan

Centering a “position: absolute” element

Sometimes we have a one-line div, having 3 elements. One floats to the left, one floats to the right, and one in the middle. The one in the middle often gets pushed around by the left/right element, resulting off-centered. related question. [code language=“html”] \[/code\] The fix is to give the following css to the center div. [code language=“css”] position: absolute; margin-left: auto; margin-right: auto; left: 0; right: 0; [/code] Thanks to the following link. =) ...

July 8, 2015 · 1 min · birdchan

iTunes Connect Screenshot Size

Just to re-post this. iPhone 3+4 (3.5 Inch) 640 x 960 iPhone 5 (4 Inch) 640 x 1136 iPhone 6 (4.7 Inch) 750 x 1334 iPhone 6 Plus (5.5 Inch) 1242 x 2208 the phone scales them down to 1080 x 1920 iPad (Air and Mini Retina) 1536 x 2048 Apple Watch 312 x 390 pixels http://stackoverflow.com/questions/25756589/itunes-connect-screenshots-sizes-for-all-ios-iphone-ipad-apple-watch-devices http://appstoreoptimization.at/itunes-connect-screenshot-size-iphone-6/

July 7, 2015 · 1 min · birdchan

Error establishing a database connection

Try this: sudo service mysql restart If you can successfully restart your mysql service, but still cannot see your wordpress, then I wish you good luck.

June 17, 2015 · 1 min · birdchan

Jason Fried: Why work doesn't happen at work

[youtube &w=640&h=360] can’t agree more

June 7, 2015 · 1 min · birdchan

Missing code to include staticfiles

If you are reading Writing your first Django app, part 6, the code won’t work until you put in the following code from https://docs.djangoproject.com/en/1.8/howto/static-files/ (in the section named Serving static files during development) to the urls.py file. from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) Basically your urls.py needs to know where to route the static file requests. =) ...

June 1, 2015 · 1 min · birdchan

Django using TIME_ZONE to display local time

It took me a while to figure out how to do this correctly. There is too much noise from google search… Here are my settings for everything to display correctly in my admin site w/ Django 1.8. settings.py USE_TZ = True TIME_ZONE = 'US/Pacific' HUMAN_TIME_FMT = '%Y-%m-%d %H:%M:%S %p' HUMAN_TIME_FMT is optional, I put it there for my own usage. models.py from django.conf import settings from django.db import models from django.utils import timezone class Sync(models.Model): sync_start = models.DateTimeField('sync starts') sync_end = models.DateTimeField('sync ends') def __str__(self): fmt = settings.HUMAN_TIME_FMT my_dt1 = timezone.localtime(self.sync_start).strftime(fmt) my_dt2 = timezone.localtime(self.sync_end).strftime(fmt) return 'From ' + my_dt1 + ' => ' + my_dt2 More to read: # https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-TIME_ZONE # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones # http://strftime.org/ ...

May 29, 2015 · 1 min · birdchan

iphone 6 and google voice

If after switching to iphone 6 your google voice mail all of a sudden stops working, keep reading. This may have something to do with the new internal settings in iphone 6 with iOS 8. To the general public, simply need to know that the instructions from google voice to dial **004*1[GV-Number]# is not going to work. You would see error messages Setting Registration Failed. I tried it on my iphone 6 and it works now. Assuming your number is 1-650-789-1234. Simple do this: ...

May 27, 2015 · 1 min · birdchan

「牛」是怎麼死的?

牛耕田回來,躺在欄裡,疲憊不堪地喘著粗氣,狗跑過來看牠。 「唉,老朋友,我實在太累了。」牛訴著苦,「明天我真想歇一天。」 狗告別牛後,在牆角遇到了貓。 狗說:「夥計,我剛才去看了牛,這位大哥實在太累了,牠說牠想歇一天。也難怪,主人給牠的活兒太多太重了。」 貓轉身對羊說:「牛抱怨主人給牠的活兒太多太重,牠想歇一天,明天不幹活兒了。」 羊對雞說:「牛不想給主人幹活兒了,牠抱怨牠的活兒太多太重。唉,也不知道別的主人對他的牛是不是好一點兒。」 雞對豬說:「牛不準備給主人幹活兒了,牠想去別的主人家看看。也真是,主人對牛一點兒也不心疼,讓牠幹那麼多又重又髒的活兒,還用鞭子粗暴地抽打牠。」 晚飯前,婦人給豬餵食,豬向前一步,說:「女主人,我向你反映一件事。牛的思想最近很有問題,妳得好好教育牠。牠不願再給主人幹活兒了,牠嫌主人給牠的活兒太重太多太髒太累了。牠還說要離開主人,到別的主人那裡去。」 得到豬的報告,晚飯桌上,婦人對主人說,「牛想背叛你,牠想換一個主人。背叛是不可饒恕的,你準備怎麼處置牠?」 「對待背叛者,殺無赦!」主人咬牙切齒地說道。 可憐,一頭勤勞而實在的牛,就這樣被傳言「殺」死了。

May 25, 2015 · 1 min · birdchan