转换空之文库(轻国阅读Android)sln文档格式为txt Script to convert Sora.SLNovel to txt
- 使用方法
- 安装Python并下载 slnovel_to_txt.py 到任意文件夹中
| -module(cmd). | |
| %% https://kisao.wordpress.com/2013/12/16/how-to-run-a-system-command-in-erlang/ | |
| -export([run/1, run/2, test/0]). | |
| run(Cmd) -> | |
| run(Cmd, 5000). | |
| run(Cmd, Timeout) -> | |
| Port = erlang:open_port({spawn, Cmd},[exit_status]), |
| # -*- coding:utf-8 -*- # | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding("utf-8") | |
| import codecs | |
| try: | |
| import cassandra |
| # -*- coding:utf-8 -*- # | |
| def merge(lists): | |
| sorted_list = sorted(lists) | |
| result = [] | |
| (tmp_start, tmp_end) = sorted_list[0] | |
| for (start, end) in sorted_list: | |
| if tmp_end >= start: | |
| tmp_end = max(tmp_end, end) | |
| else: |
| # -*- coding:utf-8 -*- # | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding("utf-8") | |
| import operator | |
| import urllib | |
| import json |
| %% message_queue_len | |
| lists:sublist(lists:sort(fun(R1,R2) -> proplists:get_value(message_queue_len,R1,0) > proplists:get_value(message_queue_len,R2,0) end, | |
| lists:filtermap(fun(Pid) -> case erlang:process_info(Pid) of undefined -> false; R -> {true, R} end end, | |
| erlang:processes())), 10). | |
| %% reductions | |
| lists:sublist(lists:sort(fun(R1,R2) -> proplists:get_value(reductions,R1,0) > proplists:get_value(reductions,R2,0) end, | |
| lists:filtermap(fun(Pid) -> case erlang:process_info(Pid) of undefined -> false; R -> {true, R} end end, | |
| erlang:processes())), 10). |
| defmodule ApiBridge do | |
| @moduledoc """ | |
| Module for rpc call remote api@node functions. | |
| """ | |
| @defualt_rpc_timeout 3000 | |
| @doc """ | |
| rpc macro for api call | |
| """ | |
| defmacro rpc(exp, timeout \\ @defualt_rpc_timeout) do |
| #!/usr/bin/env python | |
| # -*- coding:utf-8 -*- | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding("utf-8") | |
| sys.dont_write_bytecode = True | |
| import urllib | |
| import hashlib |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding("utf-8") | |
| sys.dont_write_bytecode = True | |
| import time | |
| import requests |
https://about.gitlab.com/downloads/#ubuntu1404
* apt-get install curl openssh-server ca-certificates postfix
* curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.4.4-ce.0_amd64.deb/download
* dpkg -i gitlab-ce_8.4.4-ce.0_amd64.deb
* gitlab-ctl reconfigure