分为三
步:
-
同步gems mirror
安装rubygems-mirror 原来的rubygems-mirror好像有问题,所以使用@huacnlee改过的gem
按照README.md说明配置.mirrorrc# 国内最好用taobao的源,rubygems经常被墙 --- - from: http://ruby.taobao.org to: /data/rubygems
error_page 400 404 405 =200 @40*_json; | |
location @40*_json { | |
default_type application/json; | |
return 200 '{"code":"1", "message": "Not Found"}'; | |
} | |
error_page 500 502 503 504 =200 @50*_json; | |
location @50*_json { |
分为三
步:
同步gems mirror
安装rubygems-mirror 原来的rubygems-mirror好像有问题,所以使用@huacnlee改过的gem
按照README.md说明配置.mirrorrc
# 国内最好用taobao的源,rubygems经常被墙
---
- from: http://ruby.taobao.org
to: /data/rubygems
package com.simlegate.saveresource; | |
import android.app.Activity; | |
import android.os.Bundle; | |
public class MainActivity extends Activity { | |
public void onCreate(Bundle savedInstanceState) { |
# 查看网络端口占用情况 | |
netstat -an | grep 9000 | |
# 通过list open file命令可以查看到当前打开文件,在linux中所有事物都是以文件形式存在,包括网络连接及硬件设备。 | |
lsof -i:9000 | |
# 查看php.ini文件的位置 | |
php --ini |
function http(method, url, request) { | |
let init = { method: 'GET' } | |
if(method != 'GET') { | |
init.body = request.body | |
} | |
return fetch(url, init). | |
then(function(response){ | |
if(response.ok){ | |
response.json().then(function(json){ |
From https://nodejs.org/api/modules.html | |
require(X) from module at path Y | |
1. If X is a core module, | |
a. return the core module | |
b. STOP | |
2. If X begins with './' or '/' or '../' | |
a. LOAD_AS_FILE(Y + X) | |
b. LOAD_AS_DIRECTORY(Y + X) | |
3. LOAD_NODE_MODULES(X, dirname(Y)) |
rubycas client configuration options in config/envirement.rb
[more details] (https://github.com/rubycas/rubycas-client)
# enable detailed CAS logging
cas_logger = CASClient::Logger.new(::Rails.root+'/log/cas.log')
cas_logger.level = Logger::DEBUG
CASClient::Frameworks::Rails::Filter.configure(
:cas_base_url => "https://cas.example.foo/",
:login_url => "https://cas.example.foo/login",
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#!/bin/bash | |
PKG_MANGER="sudo apt-get install" | |
HOME="/home/simlegate" | |
echo $PKG_MANGER | |
echo "正在安装Git......." | |
nohup $PKG_MANGER git |
(ns logger.core) | |
(defn print-logger | |
[writer] | |
#(binding [*out* writer] | |
(println %))) | |
;; 将消息打印到一个内存buffer | |
(def writer (java.io.StringWriter.)) |