Skip to content

Instantly share code, notes, and snippets.

<?php
/*
* simple testscript for crypted or singned email
*/
define ("CA", "");
define ("TMP_FILE", "/tmp/1");
define ("EMAIL", "yourEmail");
@strlcp
strlcp / observ-host-tcp.sh
Created December 8, 2013 16:59
get the time between tcp packets, sync packets are ignored.
#!/bin/sh
OBSERVED="web-proxy01.nloln.cn"
tcpdump -tt -i wlan0 host $OBSERVED | awk '{ if (! match ($7, "S]")) { if (($1 - timeNow) >= 1) { print strftime("%a %b %e %H:%M:%S %Z %Y", $1), " --- ",($1 -timeNow) ; } }; timeNow=$1; }'
@strlcp
strlcp / findfiles.sh
Created November 29, 2013 14:13
find files in actual dir or some else dir and do something with them
#!/bin/bash
set +x
unset list count file
MAX=12
while IFS= read -r -d '' F; do
let ++count;
FH=$(printf "$F" | awk '{print $2}')
if [[ count -gt $MAX ]];
then unset count;
@strlcp
strlcp / checkping.awk
Last active December 25, 2015 22:19
tool to check pingstimes, awk tool is updated by shellscript
#!/usr/bin/awk -f
{
if ($7 ~ /^time/) {
split ($7, out, "=");
split (out[2], val, ".");
if (val[1] >= 60) {
system("date '+%H-%M-%S---%d/%b/%Y'");
printf ("%-20s %d \n", out[2], n);
n= 0;
@strlcp
strlcp / feedback.xml
Last active December 23, 2015 07:39
xml defining form in symphony xslt to parse it
<!-- static xml use as static xml datasource to configure -->
<entry>
<name type="required">
<text size="40" />
</name>
</entry>
<entry>
<lastname type="optional">