Skip to content
View gist:164f1dedcc37834469c0
{
//// Bezier 2 Drawing
UIBezierPath* bezier2Path = UIBezierPath.bezierPath;
[bezier2Path moveToPoint: CGPointMake(97.5, 68.12)];
[bezier2Path addCurveToPoint: CGPointMake(93.5, 83.12) controlPoint1: CGPointMake(97.5, 68.12) controlPoint2: CGPointMake(99.79, 80.7)];
[bezier2Path addCurveToPoint: CGPointMake(108.5, 74.12) controlPoint1: CGPointMake(87.21, 85.54) controlPoint2: CGPointMake(105.36, 86.23)];
[UIColor.darkGrayColor setStroke];
bezier2Path.lineWidth = 1;
[bezier2Path stroke];
View prestyle.css
html,body{
-webkit-font-smoothing:antialiased!important;
font-family:Avenir,'Helvetica Neue'!important;
}
View cursor-finder.js
function getCursorPos() {
var cursorPos;
if (window.getSelection) {
var selObj = window.getSelection();
var selRange = selObj.getRangeAt(0);
cursorPos = findNode(selObj.anchorNode.parentNode.childNodes, selObj.anchorNode) + selObj.anchorOffset;
/* FIXME the following works wrong in Opera when the document is longer than 32767 chars */
alert(cursorPos);
}
else if (document.selection) {
View klasses.rb
class Allen < ActiveRecord::Base
has_many :joins, :as => :resource
...
end
class Bob < ActiveRecord::Base
has_many :joins, :as => :resource
...
end
View hosts
# Twitter
65.49.26.99 twitter.com
65.49.26.98 si0.twimg.com
65.49.26.98 si1.twimg.com
65.49.26.98 si2.twimg.com
65.49.26.98 si3.twimg.com
65.49.26.98 si4.twimg.com
65.49.26.98 si5.twimg.com
65.49.26.97 api.twitter.com
View gist:758624
艺术|Art
喜剧|Comedy
漫画|Comics
舞蹈|Dance
设计|Design
时尚|Fashion
电影与视频|Film-and-Video
食品|Food
游戏|Games
新闻|Journalism
View Allen's HOST File
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 example.com
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
View Routes.rb
## Want a route like http://example.com/:id/photos in Rails 3
# I have a username route below
class User < ActiveRecord::Base
def to_param
screen_name
end
end
match ':id' => 'users#show', :as => 'user_profile'
View tw_hk_mo_city_name
台北|Taipei|TW
高雄|Kaohsiung|TW
台中|Taichung|TW
台南|Tainan|TW
板橋|Banqiao|TW
中和|Zhonghe|TW
新竹|Hsinchu|TW
新莊|Xinzhuang|TW
桃園|Taoyuan|TW
基隆|Keelung|TW
View china_city_name
北京|Beijing|CN
上海|Shanghai|CN
广州|Guangzhou|CN
深圳|Shenzhen|CN
西安|Xian|CN
成都|Chengdu|CN
重庆|Chongqing|CN
天津|Tianjin|CN
武汉|Wuhan|CN
沈阳|Shenyang|CN
Something went wrong with that request. Please try again.