- Install VirtualBox
- Install Vagrant
- Download Ubuntu Server ISO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "server":"xx.xx.xx.xx", | |
| "local_address": "127.0.0.1", | |
| "local_port":1080, | |
| "port_password": { | |
| "8380": "xx", | |
| "8382": "xx", | |
| "8381": "xx" | |
| }, | |
| "timeout":300, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################################################ | |
| # $Name: nginx_status.sh | |
| # $Version: v1.0 | |
| # $Function: Nginx Status | |
| # $Author: xuliangwei | |
| # $organization: www.xuliangwei.com,www,bjstack.com | |
| # $Create Date: 2016-06-23 | |
| # $Description: Monitor Nginx Service Status | |
| ############################################################ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import socket | |
| import json | |
| import argparse | |
| #{ | |
| # "service": "nutcracker", | |
| # "source": "gintama-taiwan-redis1", | |
| # "version": "0.4.0", | |
| # "uptime": 136873, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected MavenProject buildProjectModel(ArtifactInfo artifactInfo) throws Exception { | |
| try { | |
| ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest(); | |
| configuration.setLocalRepository( localRepository ); | |
| configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL ); | |
| configuration.setProcessPlugins( false ); | |
| configuration.setRepositoryMerging( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT ); | |
| Properties properties = new Properties( ); | |
| for ( String key : session.getSystemProperties( ).keySet() ){ | |
| properties.put( key, session.getSystemProperties().get(key) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse | |
| deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse | |
| ##测试版源 | |
| deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse | |
| # 源码 | |
| deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse | |
| deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse | |
| deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository" | |
| resolvers ++= Seq( | |
| "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/", | |
| "Big Bee Consultants" at "http://www.bigbeeconsultants.co.uk/repo", | |
| "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/", | |
| "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/", | |
| "Maven Central Server" at "http://repo1.maven.org/maven2", | |
| "mweiden mvn-repo" at "https://raw.github.com/mweiden/mvn-repo/master/releases") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/ruby -w | |
| require 'bigdecimal' | |
| require 'bigdecimal/util' | |
| sum = BigDecimal.new('0') | |
| count = 0 | |
| """ | |
| <book> <price> | |
| """.lines.select{|l| not l.nil? }.each{ |line| | |
| price = line.split(' ')[1] | |
| unless price.nil? then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem: --no-document |