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
| use Net::RawIP; | |
| $n = Net::RawIP->new({ | |
| ip => { | |
| saddr => '10.200.183.2', | |
| daddr => '10.200.180.30' | |
| }, | |
| tcp => { | |
| source => 3317, | |
| dest => $ARGV[0], |
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
| parallel -j 4 --nonall -S1/svr_portal_web{1..4} \ | |
| tail /home/admin/portalweb-deploy/logs/web_access.log.2015-08-04 |
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
| import org.apache.http.client.config.RequestConfig; | |
| import org.apache.http.client.methods.CloseableHttpResponse; | |
| import org.apache.http.client.methods.HttpGet; | |
| import org.apache.http.impl.client.CloseableHttpClient; | |
| import org.apache.http.impl.client.HttpClientBuilder; | |
| import org.apache.http.util.EntityUtils; | |
| import org.testng.annotations.Test; | |
| import java.net.*; |
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
| import Debug.Trace | |
| import System.Environment | |
| import System.IO | |
| newtype S a = S (Int, a) deriving (Show) | |
| fib' :: S Int -> Int | |
| fib' (S (s, 0)) = trace (show s ++ " [ label = " ++ show 0 ++ "]") 1 | |
| fib' (S (s, 1)) = trace (show s ++ " [ label = " ++ show 1 ++ "]") 1 | |
| fib' (S (s, n)) = trace (show s ++ " [label = " ++ show n ++ "]") f1 + f2 | |
| where |
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
| ------------------------------------------------------------------------------------- | |
| -- Internal function | |
| ------------------------------------------------------------------------------------- | |
| function delete_by_wild (red, wild) | |
| local result, err = red:keys(wild) | |
| if not result then | |
| ngx.say("failed to get keys : " .. wild .. ", reason :", err) | |
| return nil | |
| end | |
| for i, k in ipairs(result) do |
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
| package com.witown.probe.stream.storm; | |
| import org.junit.Test; | |
| import sun.awt.windows.ThemeReader; | |
| /** | |
| * Created by LambdaCat on 15/4/4. | |
| */ | |
| public class TestCSP { | |
| private static Integer x = 0; |
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
| mvn dependency:tree -Dverbose -Dincludes=commons-collections |
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
| get_md5_hex_str(Str) -> | |
| X = erlang:md5(Str), | |
| [begin if N < 10 -> 48 + N; true -> 87 + N end end || <<N:4>> <= X]. |
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 | |
| # ****************************************** | |
| # | |
| # A function which calculator the Rt of log | |
| # | |
| # ****************************************** | |
| function getEpochMillionSecond | |
| { | |
| ret=$(date +%s%N -d "$1" | cut -b -13) |