Skip to content

Instantly share code, notes, and snippets.

@improve100
improve100 / ubuntu install wine
Created May 10, 2018 05:44
How to install Wine on Ubuntu Linux 64bit
1.Use the following commands to install Wine on your 64bit Ubuntu Linux system. First, enable i386 architecture:
# dpkg --add-architecture i386
2.install Wine via the Ubuntu Wine Team PPA repository where the current latest of this writing is 1.8.
Please note that you still need to enable i386 repository as shown above:
#add-apt-repository ppa:ubuntu-wine/ppa
apt-get update
apt-get install wine1.7
3.open terminal c-a-t,run winetricks.then install app vs2010
1.终端如何默认开启tmux
在终端的Edit里面的Profile Preference里面的Title and Command里面
勾上Run a custom command instead of my shell
并且在 Custom command 里面填上 tmux 保存即可,这样便可以当运行终端时自动运行 tmux
2.利用tmux的各种强大的外部命令,我们就可以自定义脚本,自动化很多事情
#!/bin/bash
tmux has-session -t robot
if [ $? != 0 ]; then
tmux new-session -s robot -n initrobot -d
1,列出某个IP地址所提供的共享文件夹
smbclient -L 198.168.0.1 -U username%password
2,像FTP客户端一样使用smbclient
smbclient //192.168.0.1/tmp -U username%password
执行smbclient命令成功后,进入smbclient环境,出现提示符: smb:/>
这里有许多命令和ftp命令相似,如cd 、lcd、get、megt、put、mput等。通过这些命令,我们可以访问远程主机的共享资源。
get 从远程到本地
1.建立源码编译的目录
mkdir nginx-src && cd nginx-src
2.下载源码仓库
http://nginx.org/en/download.html 下载最新ngix
git clone https://github.com/arut/nginx-rtmp-module.git
3.安装依赖
sudo apt install libpcre3 libpcre3-dev
sudo apt install openssl libssl-dev
4.编译安装ngix
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master
@improve100
improve100 / gtags 注意事项
Last active June 22, 2018 06:02
spacemacs layer summary
helm
gtags
(c-c++ :variables
c-c++-default-mode-for-headers 'c++-mode
c-c++-enable-clang-support t)
auto-completion
better-defaults
emacs-lisp
git
;; markdown
@improve100
improve100 / snap nextcloud 非80
Last active June 22, 2018 07:43
snap nextcloud
sudo snap set nextcloud ports.http=81 ports.https=444
sudo apt-get update
sudo apt-get install snap
sudo apt-get install snapd
sudo snap install nextcloud
但修改域名后,nextcloud登录有问题,修改这个文件sudo vim /var/snap/nextcloud/7658/nextcloud/config/config.php
'trusted_domains' =>
@improve100
improve100 / apache2 代理
Created June 21, 2018 03:15
ubuntu apache2 redirect other web port to 80
sudo a2enmod proxy && sudo a2enmod proxy_http
<VirtualHost *:80>
ServerName cloud.sanmen.home
ProxyPreserveHost On
ProxyPass / http://localhost:81/
ProxyPassReverse / http://localhost:81/
</VirtualHost>
@improve100
improve100 / gist:624cf35fd50b89abd934be4125488211
Created June 22, 2018 05:23
webservice gsoap c++ completion steps
服务端:
/usr/local/gSOAP/bin/wsdl2h -o calc.h http://www.genivia.com/calc.wsdl 从链接中生成
/usr/local/gSOAP/bin/wsdl2h -o calc.h calc.wsdl 从现有文件中生成
/usr/local/gSOAP/bin/soapcpp2 -i -Iimport calc.h 编译生成文件
c++ -o calcserver calcserver.cpp stdsoap2.cpp soapC.cpp soapcalcService.cpp
客户端
g++ -o calcclient calcclient.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp
@improve100
improve100 / .spacemacs.el
Created June 22, 2018 05:42
spacemacs configration file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@improve100
improve100 / loading.org
Created June 25, 2018 15:44 — forked from TheBB/loading.org
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the