Skip to content

Instantly share code, notes, and snippets.

@maylogger
maylogger / Preferences.sublime-settings
Last active December 14, 2015 21:09
sublime text 最佳化
{
"binary_file_patterns":
[
"*.psd"
],
"close_windows_when_empty": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"detect_indentation": false,
"disable_formatted_linebreak": true,
"drag_text": false,
@maylogger
maylogger / parallax.js
Created February 8, 2013 10:41
js 圖片視差滾動機制
///////////////////////////////
// Parallax
///////////////////////////////
// Calcualte the home banner parallax scrolling
function scrollBanner() {
//Get the scoll position of the page
scrollPos = $(this).scrollTop();
//Scroll and fade out the banner text
.pf{ "data-alt" => "", "data-picture" => "" }
%div{ "data-src" => fakeimg(300) }
%div{ "data-src" => fakeimg(300, :retina => 1), "data-media" => "(min-device-pixel-ratio: 1.5)" }
%div{ "data-src" => fakeimg(600 ), "data-media" => "(min-width: 320px)" }
%div{ "data-src" => fakeimg(600, :retina => 1), "data-media" => "(min-width: 320px) and (min-device-pixel-ratio: 1.5)" }
%div{ "data-src" => fakeimg(1200), "data-media" => "(min-width: 768px)" }
%div{ "data-src" => fakeimg(1200, :retina => 1), "data-media" => "(min-width: 768px) and (min-device-pixel-ratio: 1.5)" }
@maylogger
maylogger / view_helpers.rb
Created February 1, 2013 09:10
nav link has current status
module ViewHelpers
def nav_link_to(name, href, options={})
if href == request.path
active = "active"
end
content_tag(:li, link_to(name, href, options), :class => active )
end
end
{
"binary_file_patterns":
[
"*.psd"
],
"close_windows_when_empty": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"detect_indentation": false,
"disable_formatted_linebreak": true,
"drag_text": false,

???

特質

  • 強調經驗勝過於實作
  • 強調品味
  • 從不分享實際工作經驗(有機會下次再分享)
  • 強調單一專業的重要而忽略人性
  • 不會寫完整的文件與簡報
  • 討論實作時,強調自己是領導人性格,擅長帶人
@maylogger
maylogger / gist:3801199
Created September 28, 2012 17:39
除去噗浪廣告
#resp_banner_ads.show {
height: 0px;
overflow: hidden;
}
@maylogger
maylogger / gist:3759884
Created September 21, 2012 05:31
貓假圖
module ViewHelpers
def placekitten(size, options={})
domain = options[:domain] || "http://placekitten.com"
src = "#{domain}/#{size}?image=#{rand(16)+1}"
g = options[:g]
if options[:g]
src = "#{domain}/g/#{size}?image=#{rand(16)+1}"
end
module ViewHelpers
def placekitten(size, options={})
domain = options[:domain] || "http://placekitten.com"
src = "#{domain}/#{size}"
g = options[:g]
if options[:g]
src = "#{domain}/g/#{size}"
@maylogger
maylogger / gist:3336865
Created August 13, 2012 04:08
如果你的 google plus button 被 reset 或是 normalize 搞炸了,可以用這個還原!
// for google plus
table.pls-container,
table tbody tr.gc-reset:nth-child(even) {
background-color: transparent;
}
.gc-reset {
background-color: transparent;
img {
max-width: none;