icon-plus

禁用Elementary OS下的开机弹框

This ain't a song for the broken-hearted No silent prayer for the faith-departed I ain't gonna be just a face in the crowd You're gonna hear my voice When I shout it out aloud It's my life It's now or never I ain't gonna live forever I just want to live while I'm alive (It's my life) My heart is like an open highway Like Frankie said I did it my way I just wanna live while I'm alive It's my life This is for the ones who stood their ground For Tommy and Gina who never backed down Tomorrow's getting harder make no mistake Luck ain't even lucky Got to make your own breaks It's my life And it's now or never I ain't gonna live forever I just want to live while I'm alive (It's my life) My heart is like an open highway Like Frankie said I did it my way I just want to live while I'm alive (It's my life) Better stand tall when they're calling you out Don't bend don't break baby don't back down It's my life It's now or never I ain't gonna live forever I just want to live while I'm alive (It's my life) My heart is like an open highway Like Frankie said I did it my way I just want to live while I'm alive It's my life It's now or never I ain't gonna live forever I just want to live while I'm alive (It's my life) My heart is like an open highway Like Frankie said I did it my way I just want to live while I'm alive It's my life

机子上了elementary OS之后,最近发现这个开机弹官网下载框问题越来越严重了
以前eOS官网还没有被wall的时候,这个框还没什么大问题,直接关掉就行了
但是现在eOS官网不能直接打开了,这个框就直接卡死在那,标题上写着log in,直接关根本关不掉
更糟糕的是,它还强制显示在所有窗口的最上层,挡住视线,由于卡死在那又移不开,所以每次开机都得用kill命令把它干掉了
这么搞,每次都要kill,实在是相当麻烦,于是最近找了找办法。发现直接禁用掉就可以了

在freya的terminal里面直接执行这一条命令:

icon-plus

js实时动画性能优化初体验

Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Okay, I tell her bring it back like she left some Bring it Bring it back like she left some Uh in the club with the lights off What you actin shy fo', come and show me that you wid it, wid it, wid it, wid it, wid it Stop playin', how you know that I wid it, wid it, wid it, wid it, wid it, wid it What you actin shy for Just give me you, just give me you Just give me you, that's all I wanna do And if what they say is true, if its true I might give me to you I may take a lot of stuff Guaranteed I can back it up I think I'ma call you bluff Hurry up, I'm waiting out front Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got, cus I don't wanna waste my time Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got now come and make it worth my while Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it It's all on you, it's all on you It's all on you, so what you wanna do And if you don't have a clue, not a clue I'll tell you what to do Come harder just because I don't like it, like it too soft I like it a little rough, not too much, but maybe just enough Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got, cus I don't wanna waste my time Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got now come and make it worth my while Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Okay, I tell her bring it back like she left some Bring it Bring it back like she left some Uh in the club with the lights off What you actin shy fo', come and show me that you wid it, wid it, wid it, wid it, wid it Stop playin', how you know that I wid it, wid it, wid it, wid it, wid it, wid it What you actin shy for Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got, cus I don't wanna waste my time Uh huh, you see me in the spot like oooh I love your style Uh huh, show me what you got now come and make it worth my while Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it Give it to me I'm worth it Baby I'm worth it Uh huh I'm worth it Gimme gimme I'm worth it 最近研究了一下页面性能优化这一块,参照着这篇文章来实际动手做了一下
原文说的非常好,一路做下来确实很有成就感,页面的性能得到了非常大的提升,实时渲染帧率从原来十几帧提高到了接近60帧。
先嗮一下成果:

icon-plus

设置 Chrome 使用 Gmail 来处理邮件连接

I know that I am runnin' out of time I want it all, mmm, mmm And I'm wishing they'd stop trying to turn me off I want it on, mmm, mmm And I'm walking on a wire, trying to go higher Feels like I'm surrounded by clowns and liars Even when I give it all away I want it all, mmm, mmm We came here to run it, run it, run it We came here to run it, run it, run it Just like fire, burnin' up the way If I could light the world up for just one day Watch this madness, colorful charade No one can be just like me any way Just like magic, I'll be flying free I'mma disappear when they come for me I kick that ceiling, what you gonna say? No one can be just like me anyway Just like fire, uh And people like to laugh at you cause they are all the same, mmm, mmm See I would rather we just go a different way than play the game And no matter the weather, we can do it better You and me together, forever and ever We don't have to worry about a thing, about a thing We came here to run it, run it, run it We came here to run it, run it, run it Just like fire, burnin' up the way If I could light the world up for just one day Watch this madness, colorful charade No one can be just like me any way Just like magic, I'll be flying free I'mma disappear when they come for me I kick that ceiling, what you gonna say? No one can be just like me anyway Just like fire, fire, fire (Run it, run it, run it) We came here to run it, run it, run it So look, I came here to run it Just cause nobody's done it Y'all don't think I can run it But look, I been here, I done it Impossible? Please Watch, I do it with ease You just gotta believe Come uh, come uh with me Oh, what's a girl to do? (What, what?) Hey, what's a girl to do? (What, what?) Oh, what's a girl to do? (What, what?) Mmmm, what's a girl to do? Just like fire, burnin' up the way If I could light the world up for just one day Watch this madness, colorful charade No one can be just like me any way Just like fire, burnin' up the way If I could light the world up for just one day Watch this madness, colorful charade No one can be just like me any way Just like magic, I'll be flying free I'mma disappear when they come for me I kick that ceiling, what you gonna say? No one can be just like me anyway Just like fire, fire (Run it, run it, run it) Just like fire (Run it, run it, run it) 现在在各种网站上还是能经常看到 mailto 这个东西,比如

<a href="mailto:i@bangz.me" target="_blank">i@bangz.me</a>

测试邮件链接
但是在使用 Chrome 的时候默认点击这些 mailto 链接却没有任何反应
现在已经不是 Outlook 的那个时代了,桌面邮件工具已经不再盛行
如今许多人都是直接使用在线的邮箱软件,比如 Gmail、Foxmail 等等
经过研究,发现 Chrome 是可以实现将 mailto 链接用 Gmail 来接管的

具体的实现步骤如下

icon-plus

javascript 中闭包的概念与用法

夜空中最亮的星 能否听清 那仰望的人 心底的孤独和叹息 夜空中最亮的星 能否记起 曾与我同行 消失在风里的身影 我祈祷拥有一颗透明的心灵 和会流泪的眼睛 给我再去相信的勇气 越过谎言去拥抱你 每当我找不到存在的意义 每当我迷失在黑夜里 夜空中最亮的星 请指引我靠近你 夜空中最亮的星 是否知道 曾与我同行的身影 如今在哪里 夜空中最亮的星 是否在意 是等太阳升起 还是意外先来临 我宁愿所有痛苦都留在心里 也不愿忘记你的眼睛 给我再去相信的勇气 越过谎言去拥抱你 每当我找不到存在的意义 每当我迷失在黑夜里 夜空中最亮的星 请照亮我前行 我祈祷拥有一颗透明的心灵 和会流泪的眼睛 给我再去相信的勇气 越过谎言去拥抱你 每当我找不到存在的意义 每当我迷失在黑夜里 夜空中最亮的星 请照亮我前行 夜空中最亮的星 能否听清 那仰望的人 心底的孤独和叹息 今天咱们来讨论一下 javascript 的这个闭包机制吧
曾经 javascript 的这个闭包的问题困惑了我很久很久
看网上那些说法看了半天都是懵的,看了书更加看不懂
过了好一段时间,在我巩固完一些基础知识之后
现在再回来看这个闭包机制,总算搞懂一些了

首先要弄明白闭包机制,必须对作用域这个东西非常熟悉
JavaScript 中,变量的局部作用域是函数级别的。

icon-plus

解决浮动脱档问题(clearfix)的常用方法

I''m waking up to ash and dust, I wipe my brow and I sweat my rust, I''m breathing in, the chemicals, gahh ahhh. I''m breaking in, shaping up, then checking out on the prison bus. This is it, the apocalypse, woah. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive. I raise my flag and dye my clothes, It''s a revolution I suppose. We''re painted red, to fit right in, woah. I''m breaking in, shaping up, then checking out on the prison bus. This is it, the apocalypse, woah. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive. All systems go, sun hasn''t died. Deep in my bones, straight from inside. I''m waking up, I feel it in my bones Enough to make my systems go Welcome to the new age, to the new age. Welcome to the new age, to the new age. Woah, woah, I''m radioactive, radioactive. Woah, woah, I''m radioactive, radioactive.

好久没有写过技术文章了,最近回顾起以前的老知识,感觉都忘掉好多了
这回来记录一下一个凡是做网页就一定会遇到的问题吧
平时做网页处理排版的时候,经常会使用到 css 的浮动功能
但是浮动一直以来都有一个很麻烦的问题,就是元素一旦浮动就会脱离文档流
这是它的缺点,也是它的优点,为什么这么说呢?
它的缺点就缺在于在排版时会增加排版的难度
有时候需要父元素始终包裹住子元素,但是float脱离文档流之后父元素就不能直接包裹住子元素了
就像这样