小编bas*_*ics的帖子

通过LESS在Font Bootstrap中集成Font Squirrel生成的字体

我试图使用Font Squirrel生成的字体作为Twitter Bootstrap的基本字体(从LESS文件编译).我正在使用带有Node.js的Express.js,并将字体文件包含在字体目录中,即

myapp
|_ public
    |_ stylesheets
        |_ font
Run Code Online (Sandbox Code Playgroud)

我通过更改变量来"安装"Font Awesome bootstrap.less并使其工作,所以我知道目录结构是正确的.使用font目录中的自定义字体文件,下一步该怎么做?我是否需要创建my-custom-font.less包含@font-face声明的文件,或者我是否需要在其中一个引导LESS文件中声明这个?我知道基本字体是variables.less通过@baseFontFamily属性声明的,但正如我所描述的,我不确定如何声明这是我的自定义字体系列.提前致谢.

编辑

以下是我尝试使用的代码片段:

@ChatypePath: "font";

@font-face {
  font-family: 'chatypeb2.1regular';
  src: url('@{ChatypePathPath}/chatypeb2.1regular-webfont.eot?v=3.0.1');
  src: url('@{ChatypePathPath}/chatypeb2.1regular-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
       url('@{ChatypePathPath}/chatypeb2.1regular-webfont.woff?v=3.0.1') format('woff'),
       url('@{ChatypePathPath}/chatypeb2.1regular-webfont.ttf?v=3.0.1') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)

注意:这里有一些错误.

更新:

正确的声明:

@chatypeFontFamily:     "ChatypeB2.1ThinThin", "Courier New", monospace;

@font-face {
    font-family: 'ChatypeB2.1ThinThin';
    src: url('font/chatypeb2.1thin-webfont.eot');
    src: url('font/chatypeb2.1thin-webfont.eot?#iefix') format('embedded-opentype'),
         url('font/chatypeb2.1thin-webfont.woff') format('woff'),
         url('font/chatypeb2.1thin-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

less font-face node.js express twitter-bootstrap

4
推荐指数
1
解决办法
2224
查看次数

退出SSH会话后最持久保存sbt进程的方法?

sbt退出ssh会话后,如何保持进程(特别是通过命令生成的进程)存活?以下相关问题[1][2][3][4]虽可提供信息,但在我的特定情况下并未得出确定的解决方案。简要背景:我有三台服务器代表组成群集的节点,并且每个节点上都运行着相同的程序来分发计算密集型任务。该过程旨在始终在计算机启动时运行,即,每个服务器专用于该项目。每个节点都有以下内容(当我有机会重新登录时,将使用正确的信息来更新它):

Ubuntu 12.04.2 LTS
JVM X.X.X (is JDK 1.7 update 24+)
Scala X.X.X
sbt X.X.X
Run Code Online (Sandbox Code Playgroud)

我可以通过大学网络访问每个节点ssh。我已经尝试过tmux并分离会话,但是只要我自己的笔记本电脑不重新启动,这只会保留该过程。我采取以下步骤在每个节点上启动程序:

  1. 通过登录到每个节点 ssh user@host -p port
  2. 导航到适当的目录并使用sbt* 启动我的程序
  3. runsbt控制台中发出命令

*实际命令是 sbt -Dgeotrellis cluster_seed_ip=xxx.xxx.xxx.xxx

disownnohup最合适的方法?给定一个答案,我需要发出什么具体且语法正确的命令(如果使用该方法,则从sbt控制台发出disown),以便该sbt进程与我的用户帐户解除关联,并且在退出ssh会话后继续运行?

ssh ubuntu session process sbt

2
推荐指数
1
解决办法
1180
查看次数

标签 统计

express ×1

font-face ×1

less ×1

node.js ×1

process ×1

sbt ×1

session ×1

ssh ×1

twitter-bootstrap ×1

ubuntu ×1