Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Happy

hxgdzyuyi

😀
Happy
View GitHub Profile
View result.css
body {
color: #ef9a9a;
}
View squarespace.js
This file has been truncated, but you can view the full file.
YUI.add("squarespace-wysiwyg-constants", function(E) {
E.namespace("Squarespace.Wysiwyg").EditorTypes = {
IFRAME: "IFRAME",
INLINE: "INLINE"
};
var d = E.namespace("Squarespace.Wysiwyg").ToolbarTypes = {
BLOCK: "BLOCK",
LOCKED_BLOCK: "LOCKED_BLOCK",
FULL: "FULL",
View gist:ccbbd328dc0b2ba92d90
var request = require('request')
, cheerio = require('cheerio')
request = request.defaults({jar: true})
var post_data = {id: "",title: "asdf",description: "",slug_hash: "",html: "sasdfs",css: "",js: "", arent: 0,"private": !1,auto_run: !0,html_pre_processor: "none",html_classes: "",head: "",css_pre_processor: "none",css_pre_processor_lib: "",css_prefix: "neither",css_starter: "neither",css_external: "",js_pre_processor: "none",js_library: "",js_modernizr: !1,js_external: "",tags: [],last_updated: "",errorCode: "",savingPenToDB: !1,saveAttempts: 0,MAX_SAVE_ATTEMPTS: 6,SAVE_ATTEMPT_TIMEOUT: 1e4,fork: !1,lastSavedPen: {},redirectingToSavedURL: !1}
request('http://codepen.io', function(error, response, body) {
var $ = cheerio.load(body)
var csrfKey = $('meta[name="csrf-token"]').attr('content')
@hxgdzyuyi
hxgdzyuyi / README.md
Last active Aug 29, 2015
测试 浏览器 loading 标志
View README.md

测试 浏览器 loading 标志

@hxgdzyuyi
hxgdzyuyi / imageview.js
Last active Aug 29, 2015
m.qzone 的图片放大代码
View imageview.js
(function() {
var mods = [], version = parseFloat(seajs.version);
define("widget/imageview/index", ["lib/zepto", "lib/qz"], function(require, exports, module) {
var uri = module.uri || module.id, m = uri.split("?")[0].match(/^(.+\/)([^\/]*?)(?:\.js)?$/i), root = m && m[1], name = m && "./" + m[2], i = 0, len = mods.length, curr, args, undefined;
for (; i < len; i++) {
args = mods[i];
if (typeof args[0] === "string") {
name === args[0] && (curr = args[2]);
args[0] = root + args[0].replace("./", "");
version > 1 && define.apply(this, args)
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 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 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: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 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/