Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Happy

hxgdzyuyi

😀
Happy
View GitHub Profile
View rendered.js
var log = console.log;
var ViewBase = Backbone.View.extend({
initialize: function(){
var oldRender = this.render;
this.render = function(){
oldRender.call(this);
log('trigger event\'s rendered')
}
},
render: function(){
View ctags
--langdef=mako
--langmap=mako:.html
--regex-mako=/def[ \t]name=['"](.*)['"]/\1/f,function/
--regex-mako=/article/\0/f,function/
--regex-mako=/aside/\0/f,function/
View gist:4125224
mplayer -ss 00:00:26 -nosound -vo jpeg:outdir=./flv -frames 2 ./demo4.wmv
mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=5000:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=360:240 -o $1.flv $1
View gist:4217040
  1. 新建文章,添加到具体分类
  2. 文章选一个特色图像。特色图像左边有个一个放media的地方, 下拉默认为embed,改成modal。 url贴入视频地址
  3. 在需要的自定义页面插入porfolio代码 【不包括注释,像gallery那样】
  • 其中category的id 在分类管理的地方 你可以鼠标移动到分类上面然后看chrome左下角的url。 其中tag_id变量后面的数字就是category的id
[portfolio count="3" category="id"]
View gist:4291755
[divider]
<img src="http://www.renklibeyaz.com/rightnowwp/wp-content/uploads/2012/02/contact.jpg" alt="" title="contact" width="600" height="350" class="alignnone size-full wp-image-91" />
[1of2]
<h4>GET IN TOUCH</h4>
[divider height="13"]
Pellentesque eu ultrices diam. Duis odio justo, sodales ac pretium quis, scelerisque vulputate massa. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris eleifend, enim in accumsan consectetur, lectus augue vulputate sapien, nec lacinia velit est feugiat felis. Integer tortor lacus, commodo et lacinia id, volutpat eget odio. Duis auctor, arcu id consequat suscipit, erat dui molestie ipsum, tempor tincidunt lacus tellus ac elit. Ut dapibus elementum magna, fermentum elementum tellus tempus nec. Fusce sit amet dui urna, ac scelerisque massa. Aenean placerat, erat eget commodo euismod, est turpis feugiat nisl, tristique sagittis nisl nulla sed. Arcu id consequat suscipit, erat dui molestie ipsum, tempor tincidunt lacus tellus ac e
View command.sh
ag "_\.\w+" -o --nofilename --nobreak | sort | uniq -c | sort -r | pbcopy
View iso_time_create.js
define(function() {
if (Date.prototype.toISOString) {
return function() {
return (new Date()).toISOString()
}
}
// modify from http://stackoverflow.com/a/8563517
function pad(number) {
var r = String(number)
View gist:ecc4e30ca09f3fa8ea49
abilities
n.能力,才干
abort
vi.异常中断,中途失败,夭折,流产,发育不全 n.中止计划[任务]
abs
anti-skid brake system,防滑煞车系统;Auto Balance System,自动平衡系统
abstinence
n.节制,节欲,戒酒
academy
n.(高等)专科院校,研究院,学会,学术团体,学院
View gist:8297244
862,1009d861
- .search {
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- }
- .search::after {
- content: " ";
- height: 11px;
- display: block;
- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAAWCAYAAABQbS1UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCNUEyNkEzRjE1QTQxMUUyOUE4QkU0NzhENTFFMTgyOCIgeG1wT
View ie-klass.html
<!DOCTYPE html>
<!--[if lt IE 7]><html class="ie6 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7 is-ie" lang="en"> <![endif]-->
<!--[if IE 7]><html class="ie7 lt-ie11 lt-ie10 lt-ie9 lt-ie8 is-ie" lang="en"> <![endif]-->
<!--[if IE 8]><html class="ie8 lt-ie11 lt-ie10 lt-ie9 is-ie" lang="en"> <![endif]-->
<!--[if IE 9]><html class="ie9 lt-ie11 lt-ie10 is-ie" lang="en"> <![endif]-->
<!--[if IE 10]><html class="ie10 lt-ie11 is-ie" lang="en"> <![endif]-->
<!--[if gt IE 10]><!--> <html lang="en"> <!--<![endif]-->
</html>