View resolve-to.js
/**
* 解析相对 css 文件的图片路径
*
* @param baseurl
* @returns {undefined}
*/
function resolveTo (baseurl) {
return function (relativePath) {
// 绝对路径
if (relativePath[0] === '/') {
View chrome-store.css
.Ka-Ia-j::-webkit-scrollbar {
overflow: visible;
-webkit-border-radius: 4px;
border-radius: 4px;
border: solid 1px #a6a6a6
}
.Ka-Ia-j::-webkit-scrollbar-thumb {
overflow: visible;
-webkit-border-radius: 4px;
View local-define-plugin.js
var RawSource = require('webpack-core/lib/RawSource')
function TestPlugin (options) {
}
var jsrg = /\.js($|\?)/i;
TestPlugin.prototype.apply = function (compiler) {
debugger;
compiler.plugin('compilation', function (compilation) {
debugger;
View queueHandle.js
function queueHandle(srcarr, distarr, handler) {
if (srcarr.length) {
var m = members.shift();
util.reqUserInfo(m.member, function (userinfo) {
userinfo.IsLock = true;
distarr.push(userinfo);
queueHandle(srcarr, distarr, handler);
})
} else {
handler(selected);
View SwitchyOmega
PAC script: data:application/x-ns-proxy-autoconfig;base64,LypPbWVnYVByb2ZpbGUqIlx1MDAyZnU4MWVhXHUwMDJmdTUyYThcdTAwMmZ1NTIwN1x1MDAyZnU2MzYyIioxNTBkZGViZTQ1NyovdmFyIEZpbmRQcm94eUZvclVSTD1mdW5jdGlvbihpbml0LHByb2ZpbGVzKXtyZXR1cm4gZnVuY3Rpb24odXJsLGhvc3QpeyJ1c2Ugc3RyaWN0Ijt2YXIgcmVzdWx0PWluaXQsc2NoZW1lPXVybC5zdWJzdHIoMCx1cmwuaW5kZXhPZigiOiIpKTtkb3tyZXN1bHQ9cHJvZmlsZXNbcmVzdWx0XTtpZih0eXBlb2YgcmVzdWx0PT09ImZ1bmN0aW9uIilyZXN1bHQ9cmVzdWx0KHVybCxob3N0LHNjaGVtZSl9d2hpbGUodHlwZW9mIHJlc3VsdCE9PSJzdHJpbmcifHxyZXN1bHQuY2hhckNvZGVBdCgwKT09PTQzKTtyZXR1cm4gcmVzdWx0fX0oIitcdTgxZWFcdTUyYThcdTUyMDdcdTYzNjIiLHsiK1x1ODFlYVx1NTJhOFx1NTIwN1x1NjM2MiI6ZnVuY3Rpb24odXJsLGhvc3Qsc2NoZW1lKXsidXNlIHN0cmljdCI7aWYoL15odHRwczpcL1wvLipcLmNsb3VkZnJvbnRcLm5ldFwvLy50ZXN0KHVybCkpcmV0dXJuIitzaGFkb3dzb2NrcyI7aWYoL15mZWVkbHlcLmNvbSQvLnRlc3QoaG9zdCkpcmV0dXJuIitzaGFkb3dzb2NrcyI7aWYoL15tYWlsXC5nb29nbGVcLmNvbSQvLnRlc3QoaG9zdCkpcmV0dXJuIitzaGFkb3dzb2NrcyI7aWYoL153d3dcLmdvb2dsZVwuY29tJC8udGVzdChob3N0KSlyZXR1cm4iK3NoYWRvd3NvY2tzIjtpZigvXmNvZGVcLmdvb2dsZVwuY2
View uniqueArr.js
function uniqueArr(arr, juggfunc) {
var resArr = [];
var has = false;
for (var i = 0; i < arr.length; ++i) {
for (var j = 0; j < resArr.length; ++j) {
if( juggfunc(resArr[j], arr[i]) ){
has = true;
}
}
if (has) {
View gist:25d7b4d962a402e0ac4e
function uniqueAndCount(list) {
var index = 0,
num = 0;
var result = [];
for (var i = 0; i < list.length; i++) {
if ($.inArray(list[i], result) < 0) {
result.push(list[i]);
while ($.inArray(list[i], list, index) > -1) {
num++;
index = $.inArray(list[i], list, index) + 1;
View gist:9482014
fun! s:use_eval(co)
let c = a:co
let r = eval('0x'.c[0].c[1])
let g = eval('0x'.c[2].c[3])
let b = eval('0x'.c[4].c[5])
return [r,g,b]
endfunction
fun! s:without_eval(co)
let c = a:co
View python_resources.md

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides