Skip to content

Instantly share code, notes, and snippets.

View lajunta's full-sized avatar
🌴
On vacation

lajunta lajunta

🌴
On vacation
View GitHub Profile
#######################################################
### Calomel.org /etc/nginx.conf BEGIN
#######################################################
pid /var/run/nginx.pid;
#user nginx nginx;
user nobody nogroup;
worker_processes 2;
events {
use epoll;
upstream dljyunicorn {
#server unix:/tmp/dljy.sock fail_timeout=0;
server localhost:9999;
}
server {
listen 80;
charset utf-8;
server_name dl.lwqzx.net;
add_header Cache-Control public;
access_log /var/log/nginx/access_dljy.log main;
upstream dc {
server localhost:9090;
#server unix:/tmp/dc.sock max_fails=3 fail_timeout=60s;
}
server{
access_log /var/log/nginx/access_kpy.log main;
error_log /var/log/nginx/error_kpy.log;
listen 80;
charset utf-8;
server_name kpy.lwqzx.net;
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/usr/local/rvm/gems/ruby-2.0.0-p0/bin
# m h dom mon dow user command
# Ubuntu upstart file at /etc/init/penroll.conf
start on runlevel [2345] or net-device-up IFACE!=lo
stop on runlevel [06]
env PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/local/rvm/bin
chdir "/data/sites/dljy"
script
#rvm 1.9.3 exec bundle exec puma -e production -b unix:///tmp/dljy.sock
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
# Ubuntu upstart file at /etc/init/penroll.conf
start on runlevel [2345] or net-device-up IFACE!=lo
stop on runlevel [06]
env PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/usr/local/rvm/gems/ruby-1.9.3-p392/bin
chdir "/data/sites/kpy"
exec puma -e production -p 8080
respawn
iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
Place your new font in the folder app/assets/fonts.
Tell the server where the fonts are located and that it has to precompile assets with those specific file extensions. You probably only have to add the following lines to your config/environments/production.rb file since you are not precompiling your assets locally. If you are, then also add these lines to your config/environments/development.rb file:
# Add the fonts path
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
# Precompile additional assets
config.assets.precompile += %w( .svg .eot .woff .ttf )
Declare your font in your css like so:
我们本地的git目录下, 其实分为三种类型的文件: working tree、index file和native repository;
working tree就是我们当前修改的文件;
在使用"git add"命令后, git就会把diff合入index file(通过“git diff”来查看working tree与index file的差别);
再使用"git commit"命令, 把修改合入native repository("git commit -a"相当于"git add" + "git commit"; 在commit之前, 可以通过""git diff --cached"来查看index file与commit的差别);
其实, 还可以使用"git reset"命令来还原git节点.
"git reset --hard patch-hash-name" 可以使working tree、index file以及native repository彻底回复到指定的节点;
"git reset --mixed patch-hash-name" 可以使index file和native repository被还原;
"git reset --soft patch-hash-name" 可以使native repository被还原;