compass

Keep @import at the end of CSS after SCSS compile

风格不统一 提交于 2019-12-01 20:13:21
We need to put @import at the end of my CSS file. For example: SCSS: @import "reset.css"; Body { font: 0.8em arial; } @import "customation.css" compile to: @import "reset.css";body{font: 0.8em arial;}@import "customation.css" but after compile it changed the @import order and CSS file will be this: @import "reset.css";@import "customation.css";body{font: 0.8em arial;} It's very important for us to keep @importing the custom.css file at the end for our customization. We can't put the @import to CSS file manually because SCSS file will be changed and CSS file will be rewritten. Any suggestion?

centos mongoDB开启远程访问

徘徊边缘 提交于 2019-12-01 14:44:19
mongodb数据库启动后,默认只能在本地使用,端口为27017,那么如何设置让它可以远程访问呢? 1.修改配置文件mongod.conf 不同版本可能为 mongodb.conf 命令:vim /etc/mongod.conf 把 bindIp=127.0.0.1 这一行修改成 bindIp=0.0.0.0 不同版本可能是bind_ip 注意:设置远程访问以后,密码启动auth授权访问,不然非常不安全,数据库容易被攻击, 具体修改请自行搜索,已下配置可能和你的版本不一致 在配置文件中修改如下: # Turn on/off security. Off is currently the default #noauth = true auth = true ----------------------------------------------------------------------------------------------------------------------------------------- 2.在mongo数据库中新建用户名和密码: 在非授权模式下启动数据库,并使用mongo连接上数据库,例如我们要新建meeting数据库的用户和密码,则: use meeting db.createUser({user:"kimkat",pwd:"123456"

Sass 3.4 Removing forward slash on a string

纵然是瞬间 提交于 2019-12-01 10:51:02
is theres a workaround or any other ways to make this work on Sass 3.4 + @mixin icon ($name, $code) { .#{$name}::before { content: str-slice("\x",1,1) + $code;} } @include icon('test', 4556); Code should output .test::before { content: "\4556"; } But on 3.4+ the \ slash is getting removed and outputted as .test::before { content: "x4556"; } Thanks You stumbled across a currently-debated issue with escape characters in Sass . It seems that, currently, Sass will either add too many characters, or winds up putting the unicode character into the output css. UPDATE: @mixin icon ($name, $code) {

centos mongoDB开启远程访问

梦想的初衷 提交于 2019-11-30 18:04:00
mongodb数据库启动后,默认只能在本地使用,端口为27017,那么如何设置让它可以远程访问呢? 1.修改配置文件mongod.conf 不同版本可能为 mongodb.conf 命令:vim /etc/mongod.conf 把 bindIp=127.0.0.1 这一行修改成 bindIp=0.0.0.0 不同版本可能是bind_ip 注意:设置远程访问以后,密码启动auth授权访问,不然非常不安全,数据库容易被攻击, 具体修改请自行搜索,已下配置可能和你的版本不一致 在配置文件中修改如下: # Turn on/off security. Off is currently the default #noauth = true auth = true ----------------------------------------------------------------------------------------------------------------------------------------- 2.在mongo数据库中新建用户名和密码: 在非授权模式下启动数据库,并使用mongo连接上数据库,例如我们要新建meeting数据库的用户和密码,则: use meeting db.createUser({user:"kimkat",pwd:"123456"

Sass和LESS-动态CSS技术

笑着哭i 提交于 2019-11-30 15:07:09
一、简介 二、Sass/Scss的使用 变量 注释 css 中注释的作用包括帮助你组织样式、以后你看自己的代码时明白为什么这样写,以及简单的样式说明。但是,你也并不希望每个浏览网站源码的人都能看到所有注释。 因此,scss注释方式有两种: body { color: #333; // 这种注释内容不会出现在生成的css文件中 padding: 0; /* 这种注释内容会出现在生成的css文件中 */ } 混合宏mixin VS 继承 VS 占位符 什么时候用 混合宏 ,什么时候用 继承 ,什么时候使用 占位符 ?三者各有优缺点,详细比较可以参考 http://www.imooc.com/code/7041 ,总的来说就是: 优先使用占位符,如果一定需要基类则用继承,如果需要传递参数则使用混合宏mixin。 下图同样是上面链接中关于三者比较的一张图片。 运算 运算包括数字运算、变量运算 数字运算包括:加法、减法、乘法和除法等运算, SASS的编译输出格式 Sass/Scss 编译后生成的CSS的式样格式有: expanded nested compact compressed 其中expanded是默认的格式,和我们平时手动书写CSS的一致,所有式样都是展开的。 nested:输出CSS是,根据在Scss中的“嵌套”显示相应的缩进,嵌套的越深,缩进的越多。 compact

windows下使用MongoDB Compass Community远程连接mongodb

不羁岁月 提交于 2019-11-30 09:31:17
windows下使用MongoDB Compass Community远程连接mongodb 关键词: 发布时间:2018-08-01 23:22:29 浏览次数:290 场景: win10下装了MongoDB Compass Community,也装了viturlbox虚拟机,虚拟机中装了mongodb,现在需要在windows下通过MongoDB Compass Community连接虚拟机中的mongodb 1.Hostname默认是localhost,此处填写域名或者ip号会提示“Error creating SSH Tunnel: (SSH) Channel open failure: Connection refused”。 2.Port默认是27017. 3.一般我们通过SSH连接,此处填写与shell相同的连接信息即可。 4.找到/etc下的mongod.conf,把 “bindIp: 127.0.0.1”这一句注释掉,即在前面加一个“#”,使其能通过外链连接。 5.需要修改服务器上/etc/ssh下的sshd_config文件,增加一行“AllowTcpForwarding yes”(通过sudo vim 来修改文件,不清楚此命令的同学请自行搜索),来允许其通过TCP进行连接。然后运行sudoservice sshd restart来重启ssh。

Using libsass with compass

馋奶兔 提交于 2019-11-30 08:30:28
Exactly as the title says. Compilation times over 50 seconds are unacceptable. So, is there a way, let's say: a single (partial) file with compass magic (like sprite mixins, etc.), and the rest of files with pure sass? I'm considering moving to less (reference importing), and substituting all compass tricks with additional grunt tasks, but I'm more comfortable around sass than less. I saw those tickets , but I hoped there would be a way to compile a single file with compass, and the rest to be merged with libsass (I sometimes use sass 3.3 syntax, but if I can gain better compile times I can

快速了解MongoDB

落花浮王杯 提交于 2019-11-30 05:54:08
简介 MongoDB是一款为广泛的现代应用程序设计的高性能、可扩展、分布式数据库系统。MongoDB可用于不同规模大小的组织,为那些对系统低延迟、高吞吐量以及可持续性有很高要求的应用提供稳定关键的服务。 尽管MongoDB与传统的关系型数据库的有些特性不一样,但是对于之前部署和操作其他数据库系统的人员来说,MongoDB的很多概念,比如操作、策略、存储过程还是很相似的。公司的DBA和运营团队可以在保持现有系统的前提下,直接把MongoDB集成到生产环境中,并且不需要定制操作流程和工具 本文档为部署和管理MongoDB提供了最佳实践的指导。看本文档的前提需要你熟悉MongoDB的基本架构并理解企业软件部署的相关知识。 关于文档中的涉及到有些话题的更多详情,可以访问MongoDB的在线文档:mongodb.com。本文档也提供了相应的链接。 角色和职责 与其他数据库系统一样,部署在MongoDB的应用需要精心规划以及公司IT团队每个角色的协力合作才能保证稳定的部署。传统数据库中相关的角色以及角色的定位同样适用于MongoDB:数据库管理员、系统管理员、应用开发人员、网络管理员、需求分析人员以及数据架构师。 一般小公司中一个人员可能会担当多个角色,而大公司中,每个角色都是由一个人或者一个团队专门负责的。比如,在大的投资银行中,DBA的职责和系统管理员的职责差别就很大。 DBA

gem install cannot download from rubygems.org

拈花ヽ惹草 提交于 2019-11-30 03:53:15
问题 When I type gem install sass I get the following error message C:>gem install compass ERROR: Could not find a valid gem 'compass' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://rubygems.org/latest_specs.4.8.gz) 回答1: Use http instead of https gem sources --remove https://rubygems.org/ gem sources -a http://rubygems.org/ 回答2: I have experienced the same symptoms

关于sass的基础语法介绍

孤者浪人 提交于 2019-11-29 21:35:30
注:主要作为记录用 前言:    sass是css预编译工具中的一种,结合compass使用可以大大加快css开发的速度,同时也可以解决一些css开发里比较难受的点。使用sass可以使css的开发对编程人员更友好。 安装和使用:    sass基于ruby,首先需要去ruby官网下载安装ruby。 ruby下载地址 .    下载安装过程很简单,记得勾选添加到PATH。之后就可以在命令行里通过 ruby -v 来查看是否安装成功。    然后就可以使用gem包管理工具了 因为容易被墙 需要换源:     gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/    可能会碰到SSL证书问题, 改为 http://gems.ruby-china.org/    之后用gem install sass 安装sass    同时可以用gem install compass 安装compass    成功后就可以使用了,可以在一个目录下,使用 compass create projectName 来新建一个sass项目    然后使用 compass watch可以监听并且实时reload项目 得到编译后输出的css文件。    关于cpmpass的使用会在之后总结。先来讲讲Sass。